|
本帖最后由 MurrddoL 于 2019-12-9 11:26 编辑
查找过之前中转的贴子netflix流量中转到另一个
@ymcoming 的回贴如下
如果你落地鸡是SS,也可以不变,唯一变的是中转鸡的V2服务器端的"outboundDetour":
---------------------------------------------------------
[
{
"tag": "netflix",
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "xxx.com",
"port": xxx,
"method": "aes-256-gcm",
"password": "xxxx",
"ota": false,
"level": 1
}
]
}
----------------------------------------------------
我目前用的是v2ray搭建的ss+v2ray-plugin和ss+ws(供quantumult x /kitsunebi使用).
v2ray服务端
- {
- "log": {
- "access": "/var/log/v2ray/access.log",
- "error": "/var/log/v2ray/error.log",
- "loglevel": "info"
- },
- "inbounds": [
- { // 第一个进站配置,用于普通的 v2ray-plugin
- "port": 10100,
- "protocol": "dokodemo-door",
- "tag": "wsdoko",
- "settings": {
- "address": "v1.mux.cool",
- "followRedirect": false,
- "network": "tcp"
- },
- "streamSettings": {
- "network": "ws",
- "wsSettings": {
- "path": "/s"
- }
- }
- },
- { // 配合上面的进站配置的 SS 协议配置
- "port": 8389, // 此处的端口实际用不到但必须设置
- "protocol": "shadowsocks",
- "settings": {
- "method": "aes-128-gcm",
- "ota": false,
- "password": "Fuck高墙",
- "network": "tcp,udp"
- },
- "streamSettings": {
- "network": "domainsocket"
- }
- },
- { // 第三个进站配置,用于 Quantumult X 的 v2ray-plugin
- "port": 10200,
- "protocol": "shadowsocks",
- "settings": {
- "method": "aes-128-gcm",
- "ota": false,
- "password": "Fuck高墙",
- "network": "tcp,udp"
- },
- "streamSettings": {
- "network": "ws",
- "wsSettings": {
- "path": "/x"
- }
- }
- }
- ],
- "outbounds": [
- {
- "protocol": "freedom",
- "settings": {},
- "tag": "direct"
- },
- {
- "protocol": "blackhole",
- "settings": {},
- "tag": "blocked"
- },
- { // 用于普通 v2ray-plugin
- "protocol": "freedom",
- "tag": "ssmux",
- "streamSettings": {
- "network": "domainsocket"
- }
- }
- ], // 用于普通 v2ray-plugin
- "transport": {
- "dsSettings": {
- "path": "/var/run/ss-loop.sock"
- }
- },
- "routing": {
- "rules": [
- { // 用于普通 v2ray-plugin
- "type": "field",
- "inboundTag": [
- "wsdoko"
- ],
- "outboundTag": "ssmux"
- },
- {
- "type": "field",
- "ip": [
- "geoip:private"
- ],
- "outboundTag": "blocked"
- }
- ]
- }
- }
复制代码
caddy 配置
- server {
- listen 80;
- server_name banana-zone.me;##你的域名
- #rewrite ^(.*)$ https://$host$1 permanent; ##这句是强制HTTP跳转HTTPS
- #rewrite ^/(.*) https://www.microsoft.com permanent;
- }
- #上面这个我是让http直接跳转到/www.microsoft.com permanent,会导致shadowrocket连不了
- server
- {
- listen 443;
- ssl on;
- server_name banana-zone.me;##你的域名
- ssl_certificate /root/ssl/banana-zone.me.fullchain.cer; ##证书位置
- ssl_certificate_key /root/ssl/banana-zone.me.key; ##证书位置
- ssl_session_timeout 5m;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
- ssl_prefer_server_ciphers on;
- index index.html index.htm index.php;
- #上面是Nginx的https配置
- location / {
- proxy_pass https://www.microsoft.com;
- }
- #这个是反向代理,即浏览banana-zone.me时会跳转到www.microsoft.com
- location /s { # path
- proxy_redirect off;
- proxy_pass http://127.0.0.1:10100; # Shadowsocks 或 VMess 配置里的端口
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $http_host;
- }
- #上面是适用于shadowrocket的配置
- location /x { # path
- proxy_redirect off;
- proxy_pass http://127.0.0.1:10200; # Shadowsocks 或 VMess 配置里的端口
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $http_host;
- }
- }
- #上面是适用于Quantumult X的配置
- #看个人需求,需要哪个要哪个或者两个一起
复制代码
或者caddy
- example.com { # 你的域名
- tls mail@example.com # 你的邮箱用于申请 SSL 证书
- gzip
- # root /var/www/example.com
- proxy / www.microsoft.com # 需要反向代理网站的网址
- proxy /s localhost:10100 { # 用于 v2ray-plugin 的 path
- websocket
- header_upstream -Origin
- }
- proxy /x localhost:10200 { # 可以多加一个给 Quantumult X
- websocket
- header_upstream -Origin
- }
- }
复制代码
问题来了,中转鸡的V2服务器端怎么添加ss+v2ray-plugin |
|