Gå til hovedinnhold

xtls with Mullvad VPN

Connectivity Bridges Windows Linux Android Mobile Installation macOS Desktop V2Ray Multihop Censorship circumvention 

Sist oppdatert:

This guide will show you how to connect using xtls and Mullvad VPN.

WARNING: Keep in mind that v2rayN, v2rayNG, v2rayxs, and nekoray have not been audited by us, and that they are third party programs.

What this guide covers

Using Windows

Requirements

Download and install:

Download:

  1. Extract the v2rayN-With-Core.zip file.
  2. Start v2rayN.exe .
  3. If you do not have Microsoft .NET 6.0 Desktop runtime installed, it will prompt you to download it, do so, and then install it.
  4. When starting v2rayN it will start with Chinese language, to change this click on the thre dots to the right,
    then select the option that shows zh-Hans and change that to en after that right-click on the v2rayN icon in the systray and select the last option, this will exit the app.
  5. Start the v2rayN app again.
  6. Copy the url encoded config (VLESS link) into your clipboard, it will start with vless://
  7. In the v2rayN app, press CTRL-V this will add the server.
  8. In the V2rayN app, click on Setting followed by OptionSetting and set the SOCKS port to 1080
  9. Go to the Mullvad app settings > Split tunneling and click on the button “Find another app” in the bottom. Browse to the location of the v2rayN app (in the Downloads folder) and in the bin folder select xray and then Xray.exe and click on Add.
  10. Open the Command Prompt and run the following commands:  (On other xtls servers you will need to replace <bridge IP> )

    mullvad bridge set custom set socks5 local 1080 <bridge IP> 443
    
    mullvad relay set tunnel-protocol openvpn
    
    mullvad bridge set state on
    
    mullvad connect

 

Using Android

Requirements

Download and install:

Configure the v2rayNG app

  1. Tap on the ☰ menu icon, then Settings.
  2. Make sure that the SOCKS5 proxy port is set to 1080.
  3. Change Mode to Proxy only.
  4. Tap on your device's back button.
  5. Copy the url encoded config (VLESS link).
  6. Tap on the plus icon on the tool bar and select Import config from Clipboard.

Configure the OpenVPN app

  1. Download an OpenVPN configuration file for Android and make sure that Connect via bridges is checked.
  2. Open the OpenVPN for Android app.
  3. Tap on the + icon and tap on import and then choose the OpenVPN configuration file that you downloaded before.
  4. Tap on the pen edit icon next to the profile you imported.
  5. In the top bar, scroll left and tap on Advanced. Then scroll down and tap on Custom Options.


     
  6. On a new line add: socks-proxy 127.0.0.1 1080
  7. Tap on OK. Then in the top bar tap on Allowed apps.
  8. Make sure that VPN is used for all apps but exclude selected is enabled.


     
  9. Scroll down the list and find v2rayNG and tap on the square icon to enable it.
     
  10. Tap on your device's back button.

Connect using v2rayNG

  1. Tap on the newly added server and click on the V icon.
  2. In the OpenVPN app, tap on the server profile to connect to it. The first time you connect to a profile, you will be asked for a username and password. Use the following:
    username – use your Mullvad account number (without any spaces)
    password –  use the letter m
  3. In the log window it should say "Initialization Sequence Completed" in the bottom.
  4. Tap on the arrow button in the top left corner.
  5. Both apps should now say "Connected".


     
  6. Verify your connection with our Connection check. Note that it will only show the OpenVPN exit server, not the v2ray server.

 

Using macOS

Requirements

Configure Tunnelblick

  1. Visit our OpenVPN configuration file generator
  2. Select a country and (if available) a city
  3. Click on Advanced and enable Connect via bridges
  4. Click on Download zip archive
  5. Double-click on the Zip file to extract it
  6. Right click on the Mullvad.tblk file and choose Show Package Contents
  7. Open the OpenVPN configuration file (mullvad_xx_xx.conf) with TextEdit
  8. Remove the line tun-ipv6
  9. Add the line route <bridge IP> 255.255.255.255 net_gateway
    Replace <bridge IP> with the IP-address of the bridge you want to connect to
  10. Save and close the file in TextEdit
  11. Double-click on the Mullvad.tblk file to open it with Tunnelblick, and install it

Configure v2rayxs

  1. Run v2rayxs
  2. Click on the v2rayxs icon and select configure...
  3. Set Local Socks5 Port: to 1080
  4. Click Import… and select Import from VLESS share links...
  5. Paste your url encoded config (VLESS link) and click OK
  6. In the left side list of servers, click on the new one you just imported
  7. Click transport settings
  8. Select the TLS tab
  9. Edit the following settings
    Set serverName to www.yahoo.com
    Set shortId to b4
    Set fingerprint to chrome
    Set publicKey to ecMgkqS6wkB5TxS7-sT8sIQnhVmiJlQPDC94XT-L4k8
    Scroll down in the settings view to see the publicKey setting
  10. Click OK

Connect

  1. Click on the v2rayxs icon and select Load core
  2. Click on the Tunnelblick icon and select Connect Mullvad

 

Using Linux

Tested with

  • Ubuntu 22.04
  • NekoRay 3.11 (Pre-release)

1. Download and install the latest NekoRay release (3.10+)
2. Run NekoRay, in the First time setup view, click V2Ray
3. Copy your url encoded config (VLESS link) and paste it into the NekoRay program
4. Go to Preferences and select Basic Settings
5. In the Common tab, set Socks listen port: to 1080 and click OK
6. Quit NekoRay (Important: Click on Program, select Exit)
7. In the Mullvad app, go to the Settings wheel and select Split tunneling
8. Search for nekoray, click on nekoray, and a new intance of NekoRay will open, now using Split tunneling
9. In NekoRay, click Program, hover on Active Server and select your newly added server to connect
10. In a terminal window, run the commands, one at a time; and replace <bridge IP> with the IP in the vless link

mullvad bridge set custom set socks5 local 1080 <bridge IP> 443
mullvad relay set tunnel-protocol openvpn
mullvad bridge set state on
mullvad connect

11. Open the Mullvad app, you should now see SECURE CONNECTION

If the Mullvad app is stuck trying to establish a connection, ensure that you quit NekoRay with the Exit menu option before launching it with split tunneling through the Mullvad app.

 

Do you have other servers that can be used?

Remember to replace the IP-address in the ovpn conf file.

IPv4 url encoded config (VLESS links):

  • ua-iev-br-001: IP1
  • se-sto-br-001: IP1
  • gb-lon-br-101: IP1
  • jp-tyo-br-201: IP1
  • de-fra-br-001: IP1
  • de-fra-br-101: IP1

IPv6 url encoded config (VLESS links) (Requires your Internet Provider provides IPv6 to your device):