V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
jenrey
V2EX  ›  macOS

Surge 1 个入门疑问 + 1 个复杂问题

  •  
  •   jenrey · Mar 22, 2022 · 7141 views
    This topic created in 1506 days ago, the information mentioned may be changed or developed.

    首先,感谢各位前辈回复。

    我是 macOS Surge4 ,以下均基于 macOS Surge

    • 入门疑问: Surge 的去广告规则需要一直开启 MitM 嘛?如果需要的话,是否也要把该域名的正则配置进去。 还是说,只针对 https 的规则处理需要一直开启 MitM 。http 的规则处理不需要开启 MitM 。

    • 复杂问题:

    1. 有一个 VPN 的 App ,用来访问内网。
    2. 使用 wifi 接入互联网。
    3. 启用 Surge 增强。
    4. 拨通 VPN App (拨通后 Surge 提示此时将使用 en0 网卡)

    那么问题来了,这种场景下,Surge 好像无法接管网络,也无法访问 google ,但内网可以正常访问。 请问,如何处理? 谢谢!

    Supplement 1  ·  Mar 22, 2022

    Surge增强模式开启后,ifconfig会增加一个utun4网卡。
    VPN App拨通后会增加一个ppp0网卡。

    我尝试配置如下:

    [Proxy]
    #  interface=utun4 or interface=ppp0
    FortiVPN = direct, interface=utun4, allow-other-interface=true
    
    [Rule]
    DOMAIN-SUFFIX, corpintra.net, FortiVPN
    

    还是没用任何变化,内网依旧可以访问,但google依旧无法访问。

    Supplement 2  ·  Mar 22, 2022

    借此机会,还有一个小疑问:

    Surge + ADGuard同时使用

    Surge接管的流量均显示为ADGuard,我尝试设置了ADGuard

    upstream.proxy=socks5://localhost:6153
    

    但是仍然显示流量来自ADGuard。

    Surge:4.4.1 (1532)
    ADGuard:2.5.3.955 release (CL-1.7.200)

    Supplement 3  ·  Mar 22, 2022
    ```sh
    utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet 198.18.0.1 --> 198.18.0.1 netmask 0xffffffff
    ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1354
    inet 192.168.11.61 --> 169.254.38.179 netmask 0xffffff00
    ```
    12 replies    2022-03-26 20:34:53 +08:00
    OCD2057
        1
    OCD2057  
       Mar 22, 2022 via iPhone
    1. mitm 是 https 解密 必须 hostname 里有匹配域名 不然即使你有对应规则不会生效

    2. 这个情况没试过 wiki 里好像有提过。你可以试试兼容模式开 tun
    mgcnrx11
        2
    mgcnrx11  
       Mar 22, 2022
    复杂问题,应该是 Surge 使用的 en0 网卡,但是拨通 VPN 后,VPN 新建的虚拟网卡变成了默认路由了吧。也就是流量其实不走 en0 了,也不走 surge 的 tun 了。
    imKD
        3
    imKD  
       Mar 22, 2022
    借楼问下,dns server 只能配置 udp/53 吗?可以像 clash 一样配置 tcp 、tls ,或者自定义端口吗?
    jenrey
        5
    jenrey  
    OP
       Mar 22, 2022
    @mgcnrx11 感谢回复,原来只开 Surge 的时候是走 en0 网卡,但是拨通 VPN App 后多出来一个 ppp0 网卡,但是我无法确定流量是走的哪个网卡,有什么办法可以确认吗?
    chztv
        6
    chztv  
       Mar 22, 2022
    我也是在用 Surge Mac ,同时还要使用 VPN ,我最初发现是 VPN 连上后,Google 能继续访问,但应该通过 VPN 的内网无法使用,后来通过翻阅 Surge 的社区,添加了如下的规则( VPN 生成的 interface 经常会变,从 2-10 不等,所以配置了一堆)
    VPN2 = direct, interface=utun2, allow-other-interface=true
    VPN3 = direct, interface=utun3, allow-other-interface=true
    VPN4 = direct, interface=utun4, allow-other-interface=true
    jenrey
        7
    jenrey  
    OP
       Mar 22, 2022
    @chztv 但是很奇怪的是,我用的这个 VPN App “FortiClient”拨通之后新生成的网卡是 ppp0 ,而我电脑中原有 utun1 、utun2 、utun3 这些(我不知道是哪里生成的)
    chztv
        8
    chztv  
       Mar 22, 2022
    @jenrey 我用的是 Tunnelblick ,不知道是不是和 VPN app 有没有关系
    unneeded
        9
    unneeded  
       Mar 22, 2022
    我最后用的是 docker 把 vpn 转成 socks5 代理之后在 surge 里加内网规则解决的
    我是 openvpn ,easyconnect 好像也有类似的 docker image ,别的 vpn 就得自己找一找了
    uncled
        10
    uncled  
       Mar 22, 2022
    借楼问个问题,为什么我的 surge 的系统代理前面的对勾经常会自动变成减号,失去代理功能呢?
    在这期间也没有开过其他的代理软件或者网络工具
    EIlenZe
        11
    EIlenZe  
       Mar 22, 2022 via iPhone
    macOS 开了 quantumult 再开 adguard 有时候网就很卡。浏览器左下角经常卡在 local.adguard.com
    oabbo
        12
    oabbo  
       Mar 26, 2022
    @uncled 我的 surge 最近也是出现这种情况,以前一直好好的。怀疑这版 surge 和蒙特雷不舒服斯基。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5435 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 67ms · UTC 09:34 · PVG 17:34 · LAX 02:34 · JFK 05:34
    ♥ Do have faith in what you're doing.