Skip to content

wireguard fullcone#5833

Open
LjhAUMEM wants to merge 7 commits intoXTLS:mainfrom
LjhAUMEM:wg-fc
Open

wireguard fullcone#5833
LjhAUMEM wants to merge 7 commits intoXTLS:mainfrom
LjhAUMEM:wg-fc

Conversation

@LjhAUMEM
Copy link
Contributor

  • 修复 wireguard full cone
  • 配置解析使用 std (修复 ./xray wg 无法使用问题)

close #5601

测试配置

{
  "log": { "loglevel": "debug" },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 1080,
      "protocol": "socks",
      "settings": {
        "auth": "noauth",
        "udp": true
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "wireguard",
      "settings": {
        "secretKey": "YKjJrIBGR3QjDvhXSIK4ndxiyDgNOzTJOu8teRxHQGU=",
        "peers": [
          {
            "endpoint": "",
            "publicKey": "ZaUsMjS5OeCRHLMAtp3rMDBVRYur622DRL71Bx9kjno="
          }
        ],
        "noKernelTun": true,
        "domainStrategy": "ForceIPv4"
      }
    }
  ]
}
{
  "log": { "loglevel": "debug" },
  "inbounds": [
    {
      // "listen": "127.0.0.1",
      "port": 1081,
      "protocol": "wireguard",
      "settings": {
        "secretKey": "uJX4Xm3JmWzYpqIZFiKP+JlDXUpD39eqHJ1Bsn5R5nc=",
        "peers": [
          {
            "publicKey": "Eq5K/cMuaVF7NucLpSqzxOQ+/iMFj1ZU2PpeJAscvic="
          }
        ],
        "noKernelTun": true,
        "domainStrategy": "ForceIP"
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ]
}

@RPRX
Copy link
Member

RPRX commented Mar 22, 2026

Ready 时说一声,不急的话放后面的版本也行

@LjhAUMEM
Copy link
Contributor Author

ready 了,我测试下来没啥问题

刚刚在纠结那个 localaddr,不手动创建 endpoint 好像没有这个信息,那造个假的吧,反正也用不上

@RPRX
Copy link
Member

RPRX commented Mar 22, 2026

话说这个能不能和 tun 共用一下代码

@LjhAUMEM
Copy link
Contributor Author

writeRawUDPPacket 导出应该能共用一下,其他的不好动,真正共用还是等全部重构了 wireguard 再说吧,这两目前创建的 tun 用途不太一样

@LjhAUMEM
Copy link
Contributor Author

哦对还有 udpConnectionHandler 和 udpConn,不过如果要动的话那也是换成我写的版本,hy 的 udp 入站逻辑也是类似的

@RPRX
Copy link
Member

RPRX commented Mar 22, 2026

@LjhAUMEM 说起来忘拉你进组织了,已邀请

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

关于使用WireGuard协议Nat类型为Nat3即PortRestrictedCone Nat的问题

2 participants