this post was submitted on 22 Dec 2024
216 points (99.1% liked)

Privacy

32456 readers
557 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 day ago

Mullvad apisocks5 utility

This guide shows how to use the apisocks5 utility to make a bridged connection to the Mullvad API via proxies that we provide. It is started in the Terminal (Linux, macOS) or Command Prompt (Windows). Use this together with the API access feature in the Mullvad desktop app.

This utility is made for users who are unable to connect to the Mullvad API, which is needed to log in to the Mullvad app, update your account time, validate your device and download the latest server list etc.

You can test the API connection by going to the Mullvad app settings > API access. Then click on the two round buttons with three dots inside and select Test. If it works then it should say "API reachable" for a moment. If it says "unreachable" then test the Mullvad Bridges method several times so it can try different bridges. If it doesn't work then follow this guide. What this guide covers

Start apisocks5
Configure API access
Using the CLI

Start apisocks5

Start the apisocks5 client in the Terminal (Linux, macOS) or Command Prompt (Windows):

Windows: apisocks5 -verbose

Linux: /opt/Mullvad\ VPN/resources/apisocks5 -verbose

macOS: /Applications/Mullvad\ VPN.app/Contents/Resources/apisocks5 --verbose

Note: If you have previously enabled Lockdown mode in the Mullvad app settings > VPN settings then it will block apisocks5 if Mullvad is disconnected. Use the CLI command mullvad lockdown-mode set off to turn it off. Configure API access

  1. Go to the API access settings, click on Add and enter the following settings.

    Name: apisocks5 Type: SOCKS5 remote Server: 127.0.0.1 Port: 1080 Authentication: Off

  2. Click on Add. If you get a warning that says "API unreachable, save anyway?" then click on Save. After that click on the round button with three dots and select Test. You should see a temporary message which says "API reachable" if the connection succeeded. The message will then disappear. If it says "API unreachable" then test it one more time and see if it works then.

Check the output in the Terminal or Command Prompt. If it says "Forwarding traffic from client" then it should work.

If it doesn't work then you can try it without obfuscation. Stop apisocks5 by pressing Ctrl+c on the keyboard, and start it again with this option:

apisocks5 -verbose -use-xor-proxies=false

(use the same path to apisocks5 on Linux and macOS) Using the CLI

If you want to use the CLI instead of the GUI then you can use the commands below. The methods you add with the CLI will show in the GUI as well.

Windows: apisocks5 -verbose

Linux: /opt/Mullvad\ VPN/resources/apisocks5 -verbose

macOS: /Applications/Mullvad\ VPN.app/Contents/Resources/apisocks5 --verbose

mullvad api-access add socks5 remote "apisocks5" 127.0.0.1 1080

mullvad api-access list

mullvad api-access test 3

mullvad api-access disable 1

mullvad api-access disable 2

mullvad account get