交流评论、关注点赞

  • Facebook Icon脸书专页
  • telegram Icon翻墙交流电报群
  • telegram Icon电报频道
  • RSS订阅禁闻RSS/FEED订阅

ss客户端+v2ray-plugin 配合 v2ray 服务器翻墙

2020年06月23日 15:27 PDF版 分享转发

引用

https://www.xpath.org/blog/0015661425086431d7c969c88854e5294d6b8ee4efc3c13000 
https://github.com/v2ray/discussion/issues/173

说明

在上一篇里shadowsocks v2ray-plugin websocket tls nginx, 我们介绍了v2ray-plugin的使用方法, 客户端[Client]: shadowsocks + v2ray-plugin , 服务器[Server]: nginx + shadowsocks + v2ray-plugin,
现在把服务器端修改为:nginx + v2ray. 配置文件和之前的v2ray配置稍为有点不同。

Ad:美好不容错过,和家人朋友一起享受愉快时光,现在就订票

步骤

如果想用 v2ray做服务器[server], shadowsocks + v2ray-plugin做客户端[client]的话需要在server

  • 设置一个任意门(tag:ws-in),地址设置为 v1.mux.cool,传输协议设置websocket
  • 设置一个ss inbound (tag:ss-loc),传输协议不配置
  • 设置一个freedom outbound (tag: ws-out),redirect到 ss-loc这个inbound
  • 配置路由 ws-in -> ws-out,ss-loc -> 默认freedom

配置示例

{
  "log" : {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbounds": [{
    "port": 10000,
    "listen": "127.0.0.1",
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "67ae6f41-a4b6-41e8-bfc0-572664fa3bf0",
          "level": 1,
          "alterId": 64
        }
      ]
    },
    "streamSettings":{
      "network": "ws",
      "wsSettings": {
           "path": "/raypath"
      }
    }
  },
  {
    "port": "20000",        /* this is the server port for client[nginx] */
    "listen": "127.0.0.1",
    "protocol": "dokodemo-door",
    "tag": "wsdoko",
    "settings": {
      "address": "v1.mux.cool",   /* don't change!!! */
      "followRedirect": false,
      "network": "tcp"
    },
    "streamSettings": {
      "network": "ws",      /* same as v2ray-plugin */
      "wsSettings": {
      "path": "/sspath"
      }
    }
  },
  {
    "port": 9015,   /* this port is not used, but you need to specific */
    "protocol": "shadowsocks",
    "settings": {
      "method": "aes-256-gcm",
      "ota": false,
      "password": "password",
      "network": "tcp,udp"
    },
    "streamSettings": {
      "network": "domainsocket"
    }
  }],
  "outbounds": [{
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    },
    {
      "protocol": "freedom",
      "tag": "ssmux",
      "streamSettings": {
        "network": "domainsocket"
      }
    }
  ],
  "transport": {
    "dsSettings": {
      "path": "/var/run/ss-loop.sock"  /* the directory must exist before v2ray starts */
    }
  },
  "routing": {
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "wsdoko"
        ],
        "outboundTag": "ssmux"
      },
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked"
      }
    ]
  }
}

结束

客户端和上一篇中提到的一样,直接使用shadowsocks + v2ray-plugin就行。

转自https://www.xpath.org/blog/001570189163761a17f017309394021b442dfeedba9c9b4000

喜欢、支持,请转发分享↓Follow Us 责任编辑:宋伯明