博主你好,请问能不能实现v2ray同时开启shadowsocks+v2ray,ss用ws重定向到nginx的80端口,v2ray用ws+tls重定向到nginx的443端口呢?
我自己测试了一下,v2ray能成功,但是ss不能成功。
想这样做的理由是我的卡有几十G的定向流量,如果能用80端口来混淆的话就很爽。
https://www.viagle.cn/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配置稍为有点不同。
如果想用 v2ray做服务器[server], shadowsocks + v2ray-plugin做客户端[client]的话需要在server
v1.mux.cool
,传输协议设置websocket {
"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就行。
这位同学, 你是想了解免流吗?
你可以参考之前的文章:v2ray 免流 配置
希望可以帮到你。
去年的时候还有一些可以免流, 不过现在能不能就不好说了, 看回复很多同学都不能使用了。 这个看个人和地区吧。