PinkD / corplink-rs

使用 rust 实现的飞连客户端
GNU General Public License v2.0
229 stars 30 forks source link

如何配置网页浏览代理 #29

Closed zhtjtcz closed 8 months ago

zhtjtcz commented 8 months ago

MacOS系统,按照教程正常编译安装了,启动后打开debug模式没有发现异常,部分输出如下:

DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: handshake worker 3 - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: decryption worker 4 - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: handshake worker 4 - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: event worker - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Interface up requested DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 UDP bind has been updated DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: receive incoming v6 - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Routine: receive incoming v4 - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 peer(HuwV…Lq34) - Starting DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 peer(HuwV…Lq34) - Sending keepalive packet DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 peer(HuwV…Lq34) - Sending handshake initiation DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 peer(HuwV…Lq34) - Routine: sequential receiver - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 peer(HuwV…Lq34) - Routine: sequential sender - started DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 Interface state was Down, requested Up, now Up [2024-03-18T10:28:03Z INFO corplink_rs::client] keep alive DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:03 MTU updated: 1400 DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:04 peer(HuwV…Lq34) - Received handshake response DEBUG: wg-corplink(utun10032) 2024/03/18 18:28:14 peer(HuwV…Lq34) - Receiving keepalive packet

但是浏览器页面访问特定网址提示IP不在白名单中,无法访问,也就是没有正常走代理。同时也没有观测到终端有输出转发流量,请问是不是少了配置步骤?

PinkD commented 8 months ago
2024/03/18 18:28:03 Routine: handshake worker 3 - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Routine: decryption worker 4 - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Routine: handshake worker 4 - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Routine: event worker - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Interface up requested DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 UDP bind has been updated DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Routine: receive incoming v6 - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Routine: receive incoming v4 - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 peer(HuwV…Lq34) - Starting DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 peer(HuwV…Lq34) - Sending keepalive packet DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 peer(HuwV…Lq34) - Sending handshake initiation DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 peer(HuwV…Lq34) - Routine: sequential receiver - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 peer(HuwV…Lq34) - Routine: sequential sender - started DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 Interface state was Down, requested Up, now Up 
[2024-03-18T10:28:03Z INFO  corplink_rs::client] keep alive DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:03 MTU updated: 1400 DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:04 peer(HuwV…Lq34) - Received handshake response DEBUG: wg-corplink(utun10032) 
2024/03/18 18:28:14 peer(HuwV…Lq34) - Receiving keepalive packet

从上面的 log 来看,没有异常

浏览器页面访问特定网址提示IP不在白名单中,无法访问

这个提示是谁给的?如果没有路由,浏览器会直接 timeout ,不会提示不在白名单中

zhtjtcz commented 8 months ago

提示是代码仓库给的,这个仓库配置了白名单机制,不是浏览器给出的。同时我也尝试了给仓库的IP指定路由,也是一样的结果

PinkD commented 8 months ago

提示是代码仓库给的,这个仓库配置了白名单机制,不是浏览器给出的。

什么提示,哪个仓库,什么白名单。请尽量提供详细的信息

zhtjtcz commented 8 months ago

https://codeup.aliyun.com 阿里云仓库,企业账号可以配置IP白名单,只有特定IP可以访问 提示内容: 禁止访问!当前企业设置了开启白名单验证,您的 IP 不在设置白名单范围内,请联系企业管理员进行授权

PinkD commented 8 months ago
  1. 使用 mtr 或者其他 trace route 的工具,检查访问该网站的路由是否符合预期,如果不符合预期,需要手动将该 ip 或 ip 段加入路由表,目标设备为上面的 utun10032
  2. 如果路由正确,请检查浏览器是否有开启代理插件,例如 SwitchyOmega ,这种情况会导致浏览器的流量直接走代理