本帖最後由 张无忌 於 2025-9-9 13:18 編輯
teddysun/xray里VMess-TCP
上一次"teddysun/xray"[1]的default config.json[2],现在我们看Xray-examples[3]。
HK MikroTik hAP ac3 + USB container (V2Ray / Xray) <---> mainland China (PassWall / V2RayN)
1. Default config.json
2. Xray-examples -> VMess-TCP -> config_server.jsonc[4]
VMess-TCP -> config_server.jsonc- {
- "log": {
- "loglevel": "warning"
- },
- "routing": {
- "domainStrategy": "AsIs",
- "rules": [
- {
- "type": "field",
- "ip": [
- "geoip:private"
- ],
- "outboundTag": "block"
- }
- ]
- },
- "inbounds": [
- {
- "listen": "0.0.0.0",
- "port": 1234,
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": ""
- }
- ]
- },
- "streamSettings": {
- "network": "tcp"
- }
- }
- ],
- "outbounds": [
- {
- "protocol": "freedom",
- "tag": "direct"
- },
- {
- "protocol": "blackhole",
- "tag": "block"
- }
- ]
- }
複製代碼 上面只是example,我们需要更改。我们利用"Download raw file" to Windows,用note app是"Unix (LF) UTF-8" format。
"port": 1234, ===> "port": 9000,
"id": "" ===> "id": "1eb6e917-774b-4a84-aff6-b058577c60a5"
这两个需要更改的,save "config.json"。在container Xray的shell "vi /etc/xray/config.json", 把原先config.json现在只能cut-and-copy方法。
测试用Windows V2RayN and OpenWrt PassWall,都测试过成功。
说明其他方法可以用,随意和default config.json效果一样,但是现在与新的不一样,说明其他examples都可以,那么我们可以再进一步探索。
References:
[1] teddysun/xray
[2] Xray in HK MikroTik container
[3] Xray-examples
[4] Xray-examples/VMess-TCP/config_server.jsonc
目录帖子GL.iNet and OpenWrt Contents |