تخطي إلى المحتوى الرئيسي

xtls with Mullvad VPN

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

آخر تحديث:

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 three 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. 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
  9. Save and close the file in TextEdit
  10. 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 / Debian 12
  • NekoRay 3.26
  1. Download and install the latest NekoRay release
  2. Set the folder permission:
    sudo chown -R user:user /opt/nekoray/ (replace "user" with your username)
  3. Start NekoRay with split tunneling:
    mullvad-exclude /opt/nekoray/nekoray 
  4. In the First time setup window, click Xray
  5. Copy each url encoded config (VLESS link) from below, and paste it (Ctrl+V) into the NekoRay window
  6. Go to Preferences and select Basic Settings
  7. In the Common tab, set Socks Listen Port to 1080 and click OK
  8. Click the Program button, go to Active Server and select one of your newly added servers 
  9. In a new Terminal tab/window, run the following 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

 10. In the Mullvad app you should now see SECURE CONNECTION

If you need to restart NekoRay, click on the Program button and select Exit.

Other bridge servers

Remember to also replace the IP-address in the ovpn configuration file or the "mullvad bridge" command.

IPv4 url encoded config (VLESS links):

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

View image with the IPs

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