Code Monkey home page Code Monkey logo

Comments (3)

bdbai avatar bdbai commented on August 22, 2024 1

按照 UWP VPN API 的设计,一个传统的 VPN 客户端和服务端通信最多只有两条 TCP/UDP 连接,对应两个 socket 对象。理论上这里的 socket 是 VPN 平台托管的,路由不会绕进 VPN 接口,所以要用 AssociateTransport 向平台注册 socket 对象。
然而我们的代理和传统 VPN 不一样,是 1:1 向服务端建立连接的,仅仅两个 socket 没法实现,只能让 Leaf 主动往服务端建立连接。新创建的 socket 平台没有特殊处理,依然会绕回 VPN 接口,所以我们用了 bind 主动绑定 socket 到一个物理接口来规避这个问题。

from maple.

hinego avatar hinego commented on August 22, 2024

感谢解惑,明白了

直接使用wintun也能达到相同的效果吧(同样bind 物理接口)

路由表的路由规则只是在建立链接未指定本地网络出口时自动选择的规则

如果手动指定后就不归路由表管了?

from maple.

bdbai avatar bdbai commented on August 22, 2024

Wintun 应该也可以用类似的处理方法。

bind 绑定接口大概只是 Windows 下可行,别的平台要用别的方法。关于怎么影响路由这块你可以找找别的资料,我也不是太熟。

from maple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.