mirror of
https://github.com/unchainese/unchain.git
synced 2026-04-22 23:37:07 +08:00
Testing UDP over SOCKS5 with VLESS Using V2Ray Client
This guide outlines the steps to test UDP functionality over SOCKS5 with VLESS using the V2Ray client.
Prerequisites
- Ensure you have the necessary files:
udp_echo_svr.go,main.go,config.json, andudpcheck.pyin thetestkitdirectory. - Access to the server
s3.mojotv.cnfor deploying the UDP echo server.
Steps
-
Deploy UDP Echo Server:
- Copy
testkit/udp_echo_svr.goto the servers3.mojotv.cnusing SCP. - On the server, run the following command to start the UDP echo server in the background:
go run udp_echo_svr.go &
- Copy
-
Start VLESS Proxy Server:
config.toml
#toml 格式的文件,建议字符串使用单引号,大小敏感
#
SubAddresses = 'n-us1.libragen.cn:80'# 可以被广域网访问的域名端口,可以是域名也可以是ip,多个地址用逗号分隔
AppPort = '8013' # import same as config.json
RegisterUrl = '' #主控服务器地址,主要作用是控制用户授权和流量计费,可以为空则为个人模式
RegisterToken = 'unchain.people.from.censorship.and.surveillance'# 主控服务器的token
AllowUsers = '6fe57e3f-e618-4873-ba96-a76adec22ccd' # important! same as config.json uuid
LogFile = '' #
DebugLevel = 'debug' # 日志基本debug, info, warn, error
EnableDataUsageMetering = 'false'
- In your local environment, navigate to the project root and run:
This starts the VLESS over WebSocket proxy server.
go run main.go
-
Run V2Ray Client:
- Follow the installation guide for V2Ray: https://www.v2fly.org/guide/install.html
- Change to the
testkitdirectory and start the V2Ray client using the provided configuration:The client will usev2ray run -c testkit/config.jsontestkit/config.jsonfor configuration.
-
Perform UDP Check:
- From the
testkitdirectory, run the UDP check script:This will test UDP connectivity through the SOCKS5 proxy.cd testkit && python3 udpcheck.py
- From the
Notes
- Ensure all services are running and accessible before proceeding to the next step.
- Monitor the terminal output for any errors or confirmations during the process.