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

<div class="blockcode"><div id="code_LGU"><ol><li># 入站<br /><li>&quot;id&quot;: &quot;5783a3e7-e373-51cd-8642-c83782b807c5&quot;,<br /><li>&quot;email&quot;: &quot;1111@example.com&quot;<br /><li>----<br /><li># 路由<br /><li>&quot;user&quot;: [&quot;1111@example.com&quot;],<br /><li>&quot;outboundTag&quot;: &quot;warp-1&quot;</ol></div><em onclick="copycode($('code_LGU'));">复制代码</em></div>

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

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258307&ptid=1392755" target="_blank"><font color="#999999">NetMan 发表于 2025-3-2 14:39</font></a></font></blockquote></div><br />
谢答,这是一个uuid的情况?我需求是多个uuid,入站列出来多个uuid,出站多个出口都打上了tag,路由也分别对应出口的tag,但是奇怪的是都走第一个出口   

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

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258316&ptid=1392755" target="_blank"><font color="#999999">Delly 发表于 2025-3-2 14:49</font></a></font><br />
谢答,这是一个uuid的情况?我需求是多个uuid,入站列出来多个uuid,出站多个出口都打上了tag,路由也分 ...</blockquote></div><br />
每个uuid下面加个emil就对了,多个就是:<br /><div class="blockcode"><div id="code_rfv"><ol><li>{<br /><li>&quot;id&quot;: &quot;5783a3e7-e373-51cd-8642-c83782b807c5&quot;,<br /><li>&quot;email&quot;: &quot;1111@example.com&quot;,<br /><li>...<br /><li>},<br /><li>{<br /><li>&quot;id&quot;: &quot;5783a3e7-e373-51cd-8642-c83782b807c5&quot;,<br /><li>&quot;email&quot;: &quot;2222@example.com&quot;,<br /><li>...<br /><li>}</ol></div><em onclick="copycode($('code_rfv'));">复制代码</em></div>

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

加user就行哈自己添加

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

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258324&ptid=1392755" target="_blank"><font color="#999999">NetMan 发表于 2025-3-2 14:56</font></a></font><br />
每个uuid下面加个emil就对了,多个就是:</blockquote></div><br />
加email地址是啥意思?通常配置文件里不需要加吧

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

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258326&ptid=1392755" target="_blank"><font color="#999999">tokyohot 发表于 2025-3-2 14:57</font></a></font><br />
加user就行哈自己添加</blockquote></div><br />
加了,结果出口流量都走第一个user;第二个第三个形同虚设。

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

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

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

<div class="quote"><blockquote><font color="#999999">Delly 发表于 2025-3-2 15:07</font><br />
<font color="#999999">加了,结果出口流量都走第一个user;第二个第三个形同虚设。</font></blockquote></div><br />
我意思是加peer,你添加多个peer就行内网不一样就行啊

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

<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258351&ptid=1392755" target="_blank"><font color="#999999">tokyohot 发表于 2025-3-2 15:17</font></a></font><br />
我意思是加peer,你添加多个peer就行内网不一样就行啊</blockquote></div><br />
有加peer,请看上面我的配置文件,但是奇怪的是三个uuid都走第一个出口出去<div class="quote"><blockquote><font size="2"><a href="https://hostloc.com/forum.php?mod=redirect&goto=findpost&pid=16258355&ptid=1392755" target="_blank"><font color="#999999">Delly 发表于 2025-3-2 15:20</font></a></font><br />
有加peer,请看上面我的配置文件,但是奇怪的是三个uuid都走第一个出口出去 ...</blockquote></div><br />
email等于每个uuid的入站标签,这样能理解吗?没办法直接通过uuid分流的<br />
user里必须填email
页: [1] 2
查看完整版本: 关于xray wg落地