Limour

Limour

临床医学在读。

[Explore] Using Tunnel to accelerate VPS connection

Preparation#

mkdir -p ~/app/ss && cd ~/app/ss && nano docker-compose.yml
cat > ./config.json <<EOF
{
    "server":"0.0.0.0",
    "server_port":9000,
    "password":"password0",
    "timeout":300,
    "method":"aes-256-gcm",
    "fast_open":false,
    "nameserver":"8.8.8.8",
    "mode":"tcp_and_udp"
}
EOF
version: '3.3'
services:
  ss:
    restart: unless-stopped
    ports:
      - '20077:9000'
      - '20077:9000/udp'
    volumes:
      - './config.json:/etc/shadowsocks-libev/config.json'
      - '/etc/localtime:/etc/localtime:ro'
    image: teddysun/shadowsocks-libev

Configure Tunnel#

  • Project Address: Github; Wiki; Android
  • Create Rule - Select Local as the type - Edit the file with the following content
mixed-port: 7890
allow-lan: true
bind-address: '*'
mode: rule
log-level: info
external-controller: :9090
dns:
  enable: true
  ipv6: false
  default-nameserver: [223.5.5.5, 119.29.29.29]
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  use-hosts: true
  nameserver: ['https://my.com/token']
proxies:
  - { name: 'Self-built Node', type: ss, server: 127.0.0.1, port: 7777, cipher: aes-256-gcm, password: password0, udp: true }
tunnels:
  - { network: [tcp, udp], address: 127.0.0.1:7777, target: ssip:20077, proxy: "Manual Selection"}
proxy-providers:
  provider1:
    type: http
    path: ./provider1.yaml
    url: Clash Subscription Address
    interval: 86400
    health-check:
      enable: false
      url: https://www.gstatic.com/generate_204
      interval: 300
  provider2:
    type: http
    path: ./provider2.yaml
    url: Clash Subscription Address
    interval: 86400
    filter: "(?i)AA-Relay-HK|AA-Relay-JP|AA-V2ray-HK|AA-V2ray-JP"
    exclude-filter: "(?i)Overseas Direct Connection|Game God Line"
    health-check:
      enable: false
      url: https://www.gstatic.com/generate_204
      interval: 300
proxy-groups:
  - { name: PROXY, type: select, proxies: ["Manual Selection", "Self-built Node", "Auto Selection", DIRECT] }
  - { name: "Manual Selection", type: select, use: [provider1, provider2], proxies: ["Auto Selection"] }
  - { name: "Auto Selection", type: url-test, use: [provider1, provider2], url: 'https://www.gstatic.com/generate_204', interval: 3600 }
rules:
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,PROXY

Test Acceleration#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.