2020年4月3日星期五

V2Ray运行客户端& SOCKS5服务端

启动脚本做个sh start.sh,可参考我拙劣的写法
==========================================
#!/bin/sh
#echo "Load modprobe"
modprobe ip_set_hash_net
modprobe xt_set

SSL_CERT_FILE=./cacert.pem ./v2ray --config=config.json >/dev/null 2>&1 &
=====================↑↑↑↑↑↑↑↑======================






V2Ray Config.json例程(outbound服务的信息注意改成你的)

==========================================

{
  "inbounds": [
    {
      "port": 10008, // 监听端口
      "protocol": "socks", // 入口协议为 SOCKS 5
      "sniffing": {
        "enabled": true,
        "destOverride": ["http", "tls"]
      },
      "settings": {
        "auth": "noauth"  //socks的认证设置,noauth 代表不认证
      }
    }
  ],
    "outbounds": [
        {
            "protocol": "vmess",
            "tag": "proxy",
            "settings": {
                "vnext": [
                   {
                        "address": "www.你的v2服务端域名.com",
                        "port": 443,
                        "users": [
                            {
                                "id": "8142e6a2-d43b7-43aa5e7886b7",
                                "alterId": 64,
                                "security": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "ws",
                "security": "tls",
                "wsSettings": {
                    "path": "/caddy"
                }
            },
            "mux": {
                "enabled": true
            }
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "settings": {
                
            },
            "tag": "blocked"
        }
    ],
    "routing": {
        "rules": [        
            {
                "type": "field",
                "outboundTag": "direct",
                "domain": [
                    //"geosite:cn",
                    //"domain:sharepoint.com",
                    "domain:speedtest.net"
                ]
            }
        ]
    }
}
=====================↑↑↑↑↑↑↑↑====================



实测,猫盘群晖UNIX跑起来,K2P的科学插件SOCKS5客户端指向UNIX
(不走代理的IP填入猫盘群晖)
跑科学的都交给猫盘ARM处理。跑到80Mbps时ARM也没满载。
AMD64的群晖也一样。




PS:
这样的话群晖自身流量不走代理了,依赖谷歌的有一定影响

没有评论:

发表评论

caddy反代下载文件

# 监听端口 51110,提供静态文件服务和目录浏览 :51110 {     root * /home/tls     encode gzip  # 只启用 gzip 压缩     file_server {         browse     }     # 使用提供的证书...