Skip to content

Instantly share code, notes, and snippets.

@zpoint
Last active February 3, 2026 19:35
Show Gist options
  • Select an option

  • Save zpoint/294a6837d1994e250ad6a334070f5574 to your computer and use it in GitHub Desktop.

Select an option

Save zpoint/294a6837d1994e250ad6a334070f5574 to your computer and use it in GitHub Desktop.

Revisions

  1. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ Things that needs to be prepared.
    * A wireguard config(vpn vendor that can unblock netflix/spotify)
    * I use [purevpn](https://www.purevpn.com/refer-a-friend-v1?referrer=c3FPdTFsUXVRRTJ1TUszbU5wREpzYTFOdjZhcGQ5SkYxSmFXb1FvYjROMD0=), Scroll down and follow this [guideline](https://support.purevpn.com/article-categories/getting-started/linux) to get config file for [purevpn](https://www.purevpn.com/refer-a-friend-v1?referrer=c3FPdTFsUXVRRTJ1TUszbU5wREpzYTFOdjZhcGQ5SkYxSmFXb1FvYjROMD0=).

    # Let begin
    # Steps

    ## Install V2ray

  2. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ In my use case from China network:

    * Visit `baidu/qq` from my IP directly. -- fast network speed for local resource.
    * Proxy `youtube/google` request to the VPS, from my VPS's IP. -- Unblock GFW.
    * Proxy `netflix/spotify` request to VPS, VPS then proxy the request to a VPN vendor through wireguard tunnel, this time use the VPN vendor's IP. -- Unblock Proxy Detection.
    * Proxy `netflix/spotify` request to the VPS, VPS then proxy the request to a VPN vendor through wireguard tunnel, this time use the VPN vendor's IP. -- Unblock Netflix Proxy Detection.

    Things that needs to be prepared.

  3. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ In my use case from China network:

    ![wireguard](https://user-images.githubusercontent.com/18083296/216505537-37eb9859-b425-4ad4-8858-281f6c2e2ebf.png)

    (Vray service can be both client and server)
    (V2ray service can be both client and server)


    * Visit `baidu/qq` from my IP directly. -- fast network speed for local resource.
  4. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ I previously write a gist about how to set up [v2ray + openvpn to unblock gfw an

    Refers to that [gist](https://gist.github.com/zpoint/df2483c6beb97816e34ddbde3f62f5d8) for more detail.

    In short, this a solution to proxy your network to bypass Firewall with stable connections, and also provide network diversity.
    In short, this a solution to proxy your network to bypass Firewall with stable connections, and also unblock Proxy detection for Netflix/Spotify/etc....

    In my use case from China network:

  5. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ ssh into your VPS, install v2ray server, recommand using this [one line installe
    bash <(curl -s -L https://git.io/v2ray.sh)
    ```

    Then pasted your v2ray configuration to your client
    Then pasted your v2ray configuration to your device
    * [v2rayN for windows](https://github.com/2dust/v2rayN)
    * [v2rayNG for Android](https://github.com/2dust/v2rayNG)
    * [V2rayU for Mac](https://github.com/yanue/V2rayU)
  6. zpoint revised this gist Feb 3, 2023. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -35,10 +35,6 @@ ssh into your VPS, install v2ray server, recommand using this [one line installe
    bash <(curl -s -L https://git.io/v2ray.sh)
    ```

    ```
    v2ray
    ```

    Then pasted your v2ray configuration to your client
    * [v2rayN for windows](https://github.com/2dust/v2rayN)
    * [v2rayNG for Android](https://github.com/2dust/v2rayNG)
  7. zpoint revised this gist Feb 3, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -103,7 +103,6 @@ Part of my configuration
    "protocol": "freedom"
    },
    // ...
    // Need to add this at the end of the outbounds array
    {
    "protocol": "socks",
    "settings": {
  8. zpoint revised this gist Feb 3, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,8 @@ In my use case from China network:

    ![wireguard](https://user-images.githubusercontent.com/18083296/216505537-37eb9859-b425-4ad4-8858-281f6c2e2ebf.png)

    (Vray service can be both client and server)


    * Visit `baidu/qq` from my IP directly. -- fast network speed for local resource.
    * Proxy `youtube/google` request to the VPS, from my VPS's IP. -- Unblock GFW.
  9. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -100,6 +100,7 @@ Part of my configuration
    "settings": {},
    "protocol": "freedom"
    },
    // ...
    // Need to add this at the end of the outbounds array
    {
    "protocol": "socks",
  10. zpoint revised this gist Feb 3, 2023. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -96,6 +96,11 @@ Part of my configuration
    "outbounds": [
    {
    "settings": {},
    "protocol": "freedom"
    },
    // Need to add this at the end of the outbounds array
    {
    "protocol": "socks",
    "settings": {
    @@ -118,7 +123,6 @@ Part of my configuration
    ]
    "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
    {
    "type": "field",
  11. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,7 @@ Then pasted your v2ray configuration to your client
    Setup wireguard proxy follow my repo [wireguard_socks5_docker](https://github.com/zpoint/wireguard_socks5_docker)

    ```shell
    # tested only on Ubuntu/Debian
    git clone https://github.com/zpoint/wireguard_socks5_docker.git
    cd wireguard_socks5_docker
    # build image
  12. zpoint revised this gist Feb 3, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -170,3 +170,4 @@ v2ray
    ```
    Check logs under `/var/log/v2ray/` if you encounter configuration error after restart.

    ![image title](http://www.zpoint.xyz:8080/count/tag.svg?url=github%2Fgist%2Fwireguard_netflix)
  13. zpoint created this gist Feb 3, 2023.
    172 changes: 172 additions & 0 deletions v2ray_wireguard_netflix_spotify_hulu.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,172 @@
    I previously write a gist about how to set up [v2ray + openvpn to unblock gfw and netflix](https://gist.github.com/zpoint/df2483c6beb97816e34ddbde3f62f5d8)

    Refers to that [gist](https://gist.github.com/zpoint/df2483c6beb97816e34ddbde3f62f5d8) for more detail.

    In short, this a solution to proxy your network to bypass Firewall with stable connections, and also provide network diversity.

    In my use case from China network:

    ![wireguard](https://user-images.githubusercontent.com/18083296/216505537-37eb9859-b425-4ad4-8858-281f6c2e2ebf.png)


    * Visit `baidu/qq` from my IP directly. -- fast network speed for local resource.
    * Proxy `youtube/google` request to the VPS, from my VPS's IP. -- Unblock GFW.
    * Proxy `netflix/spotify` request to VPS, VPS then proxy the request to a VPN vendor through wireguard tunnel, this time use the VPN vendor's IP. -- Unblock Proxy Detection.

    Things that needs to be prepared.

    * A VPS that can ssh into
    * Use a CN2 network or CN2 GIA network to gain fast netowk speed if you're from China.
    * Can use the vendor same as mine: [bandwagonhost](https://bandwagonhost.com/aff.php?aff=55635)(you need to login, click Client Area -> Services -> Order New Services to get CN2 server)
    * Or search CN2 [here](https://www.vpscang.com/highspeed-vps/)

    * A wireguard config(vpn vendor that can unblock netflix/spotify)
    * I use [purevpn](https://www.purevpn.com/refer-a-friend-v1?referrer=c3FPdTFsUXVRRTJ1TUszbU5wREpzYTFOdjZhcGQ5SkYxSmFXb1FvYjROMD0=), Scroll down and follow this [guideline](https://support.purevpn.com/article-categories/getting-started/linux) to get config file for [purevpn](https://www.purevpn.com/refer-a-friend-v1?referrer=c3FPdTFsUXVRRTJ1TUszbU5wREpzYTFOdjZhcGQ5SkYxSmFXb1FvYjROMD0=).

    # Let begin

    ## Install V2ray

    ssh into your VPS, install v2ray server, recommand using this [one line installer](https://github.com/233boy/v2ray/wiki/V2Ray%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC)

    ```shell
    bash <(curl -s -L https://git.io/v2ray.sh)
    ```

    ```
    v2ray
    ```

    Then pasted your v2ray configuration to your client
    * [v2rayN for windows](https://github.com/2dust/v2rayN)
    * [v2rayNG for Android](https://github.com/2dust/v2rayNG)
    * [V2rayU for Mac](https://github.com/yanue/V2rayU)
    * kitsunebi for IOS

    ## Config wireguard

    Setup wireguard proxy follow my repo [wireguard_socks5_docker](https://github.com/zpoint/wireguard_socks5_docker)

    ```shell
    git clone https://github.com/zpoint/wireguard_socks5_docker.git
    cd wireguard_socks5_docker
    # build image
    bash ./build.sh
    # copy the configure file you downloaded to ./config/wg0.conf, or pasted the content
    vim ./config/wg0.conf
    # start container
    bash ./start.sh
    # test connection
    bash ./test.sh
    ```

    ## Change the v2ray config to forward the netflix/spotify proxy to the wireguard tunne

    ```bash
    vim /etc/v2ray/config.json
    ```

    Part of my configuration

    ```
    "inbounds": [
    {
    "port": 8888,
    "protocol": "vmess",
    "settings": {
    "clients": [
    {
    // private config
    }
    ]
    },
    "streamSettings": {
    "network": "ws"
    },
    "sniffing": {
    "enabled": true,
    "destOverride": [
    "http",
    "tls"
    ]
    }
    }
    ]
    "outbounds": [
    {
    "protocol": "socks",
    "settings": {
    "servers": [{
    "port": 9050,
    "address": "localhost"
    }]
    },
    "streamSettings": {
    "tcpSettings": {
    "header": {
    "type": "none"
    }
    },
    "network": "tcp",
    "security": "none"
    },
    "tag": "streaming"
    }
    ]
    "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
    {
    "type": "field",
    "domain": [
    "domain:btstatic.com",
    "domain:netflix.com",
    "domain:netflix.net",
    "domain:nflxext.com",
    "domain:nflximg.com",
    "domain:nflximg.net",
    "domain:nflxsearch.net",
    "domain:nflxso.net",
    "domain:nflxvideo.net",
    "domain:fast.com",
    "domain:fast.ca",
    "domain:netflixinvestor.com",
    "domain:byspotify.com",
    "domain:pscdn.co",
    "domain:scdn.co",
    "domain:spoti.fi",
    "domain:spotify-everywhere.com",
    "domain:spotify.com",
    "domain:spotify.design",
    "domain:spotifycdn.com",
    "domain:spotifycdn.net",
    "domain:spotifycharts.com",
    "domain:sspotifycodes.com",
    "domain:spotifyforbrands.com",
    "domain:spotifyjobs.com"
    ],
    "outboundTag": "streaming"
    }
    ]
    }
    ```

    More domain rules refers to [here](https://github.com/v2fly/domain-list-community)

    Then restart v2ray

    ```shell
    systemctl restart v2ray
    ```

    Or select reboot menu here
    ```shell
    v2ray
    ```
    Check logs under `/var/log/v2ray/` if you encounter configuration error after restart.