Jason

Results 1 comments of Jason

@2dust 最近有空研究了一下这个问题,发现在sysproxy里面调用了RasEnumEntries枚举所有网卡,然后对每个网卡调用InternetSetOption。 参考代码:https://github.com/shadowsocks/sysproxy/blob/master/sysproxy/main.c#L119 而这个v2rayN C#代码没调用RasEnumEntries, pszConnection 没有赋值的结果是null,即LAN connection,而PPPoE是WAN connection造成无法工作。参考:https://learn.microsoft.com/en-us/windows/win32/wininet/setting-and-retrieving-internet-options 此外目前C#代码里没有调用INTERNET_OPTION_PROXY_SETTINGS_CHANGED和INTERNET_OPTION_REFRESH通知系统其他应用配置更新了。 修复办法就是照着sysproxy里去实现。不过我这里没有PPPoE的网络,无法调试验证。下面是范例代码: ``` using System; using System.Runtime.InteropServices; using System.Text; using System.Collections.Generic; public class ProxySettings { // Define P/Invoke signatures [DllImport("wininet.dll", SetLastError...