clash 怎么连 WireGuard?

查看 57|回复 2
作者:helee9199   
办公室的华硕路由器 自带了 OPENVPN 和 WireGuard 只需要简单的开启 导出配置文件
然后下载配置文件,导入到电脑客户端就可以使用了
clash 我用来科学上网,wireguard 用来代理办公室网络,因为服务器只对办公室的网络添加了白名单
但是这两个同时开启的话,clash 的代理会被暂停。
然后有了解到 clash 好像可以配置连到 wireguard
但是没有很详细的教程。我弄了一下也没能成功
想问下我这个配置对不对
[Interface]
PrivateKey = 私钥
Address = 10.6.0.2/32
DNS = 10.6.0.1
[Peer]
PublicKey = 公钥
PresharedKey = PresharedKey
AllowedIPs = 0.0.0.0/0
Endpoint = xxx.asuscomm.com:51820
PersistentKeepalive = 25
clash 的 proxies
  - name: Mywireguard
    type: wireguard
    server: xxx.asuscomm.com #路由器的 ddns
    port: 51820
    ip: 10.6.0.2 #上面的 address
    private-key: 私钥
    public-key: 公钥
    dns: [10.6.0.1] # optional
   
   然后是我要走的规则
  - IP-CIDR,111.123.45.29/32,Mywireguard
  - IP-CIDR,192.168.0.0/24,Mywireguard
然后这样配置 访问 111.123.45.29 和 192.168.0.1 都不行 日志里也是 dial failed
不知道要如何设置才可以呢?

wireguard, Clash, 私钥

e2k   
- {"name":"Mywireguard","type":"wireguard","server":"xxx.asuscomm.com","port":51820,"udp":true,"ip":"10.6.0.2","private-key":"私钥","public-key":"公钥","dns":["10.6.0.1"],"pre-shared-key":"PresharedKey","remote-dns-resolve":true}
e2k   
你少了个这个
"pre-shared-key": PresharedKey,
您需要登录后才可以回帖 登录 | 立即注册

返回顶部