Delly 发表于 2025-3-2 14:28:25

关于xray wg落地

请教mjj大佬,xray的wireguard落地,网上看到的方法都是按端口来分流不同的wireguard出口。有没有按不同的uuid来分流不同的wireguard出口的方法?(例如uuid1走wireguard-1出口;uuid2走wireguard-2出口)不想开太多端口。

NetMan 发表于 2025-3-2 14:39:34

[*]# 入站
[*]"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
[*]"email": "1111@example.com"
[*]----
[*]# 路由
[*]"user": ["1111@example.com"],
[*]"outboundTag": "warp-1"复制代码

Delly 发表于 2025-3-2 14:49:14


NetMan 发表于 2025-3-2 14:39

谢答,这是一个uuid的情况?我需求是多个uuid,入站列出来多个uuid,出站多个出口都打上了tag,路由也分别对应出口的tag,但是奇怪的是都走第一个出口      

NetMan 发表于 2025-3-2 14:39:00


Delly 发表于 2025-3-2 14:49

谢答,这是一个uuid的情况?我需求是多个uuid,入站列出来多个uuid,出站多个出口都打上了tag,路由也分 ...
每个uuid下面加个emil就对了,多个就是:
[*]{
[*]      "id": "5783a3e7-e373-51cd-8642-c83782b807c5",
[*]      "email": "1111@example.com",
[*]      ...
[*]},
[*]{
[*]      "id": "5783a3e7-e373-51cd-8642-c83782b807c5",
[*]      "email": "2222@example.com",
[*]      ...
[*]}复制代码

tokyohot 发表于 2025-3-2 14:56:30

加user就行哈自己添加

Delly 发表于 2025-3-2 14:49:00


NetMan 发表于 2025-3-2 14:56

每个uuid下面加个emil就对了,多个就是:
加email地址是啥意思?通常配置文件里不需要加吧

Delly 发表于 2025-3-2 14:57:21


tokyohot 发表于 2025-3-2 14:57

加user就行哈自己添加
加了,结果出口流量都走第一个user;第二个第三个形同虚设。

Delly 发表于 2025-3-2 15:06:38

就是如下这样,加了三个uuid,结果都走第一个出口
{
      "log": {
                "loglevel": "debug"
      },
      "inbounds": [
                {
                        "port": 12345,
                        "protocol": "vmess",
                        "settings": {
                              "clients": [
                                        {
                                                "id": "5783a3e7-e373-51cd-8642-c83782b807c5"
                                        },
                                        {
                                                "id": "6783a3e7-e373-51cd-8642-c83782b8aacc"
                                        },
                                        {
                                                "id": "9783a3e7-e373-51cd-8642-c83782bvvcc"
                                        }
                              ]
                        },
                        "streamSettings": {
                              "network": "ws",
                              "wsSettings": {
                                        "path": "/wsss"
                              }
                        }
                }
      ],
      "outbounds": [
                {
                        "tag": "wireguard-1",
                        "protocol": "wireguard",
                        "settings": {
                              "secretKey": "aaaaaccccccc",
                              "address": [
                                        "10.14.0.2/32"
                              ],
                              "peers": [
                                        {
                                                "publicKey": "bbbbbbcccc=",
                                                "endpoint": "xxxxxx:51820"
                                        }
                              ]
                        }
                },
                {
                        "tag": "wireguard-2",
                        "protocol": "wireguard",
                        "settings": {
                              "secretKey": "bbbbbbooo",
                              "address": [
                                        "10.14.0.3/32"
                              ],
                              "peers": [
                                        {
                                                "publicKey": "aaaaaaaa=",
                                                "endpoint": "oooooxxx:51820"
                                        }
                              ]
                        }
                },
                {
                        "tag": "direct",
                        "protocol": "freedom"
                }
      ],
      "routing": {
                "rules": [
                        {
                              "type": "field",
                              "user": [
                                        "5783a3e7-e373-51cd-8642-c83782b807c5"
                              ],
                              "outboundTag": "wireguard-1"
                        },
                        {
                              "type": "field",
                              "user": [
                                        "6783a3e7-e373-51cd-8642-c83782b8aacc"
                              ],
                              "outboundTag": "wireguard-2"
                        },
                        {
                              "type": "field",
                              "user": [
                                        "9783a3e7-e373-51cd-8642-c83782bvvcc"
                              ],
                              "outboundTag": "direct"
                        }
                ]
      }
}

tokyohot 发表于 2025-3-2 14:56:00

"
我意思是加peer,你添加多个peer就行内网不一样就行啊

Delly 发表于 2025-3-2 15:07:54


tokyohot 发表于 2025-3-2 15:17

我意思是加peer,你添加多个peer就行内网不一样就行啊
有加peer,请看上面我的配置文件,但是奇怪的是三个uuid都走第一个出口出去
页: [1]
查看完整版本: 关于xray wg落地