Code Monkey home page Code Monkey logo

Comments (4)

eycorsican avatar eycorsican commented on June 25, 2024

有支持 tap 的想法。但你是否能具体描述下你想怎么应用?

from go-tun2socks.

sbilly avatar sbilly commented on June 25, 2024

from go-tun2socks.

eycorsican avatar eycorsican commented on June 25, 2024

表示不太看得懂。

假如支持了 tap,那应该也只会是 tap2socks,你自己的程序是拿不到 IP 包的,如果你的程序想拿 IP 包,应该去直接读 tun,或者你是想 tun2socks 开个接口出来把特定 IP 包直接传给你程序?这个如果放在 tun2socks 里面处理的话,你可以实现一个 filter,在 filter 里面把想要的 IP 包过滤出来。

另外为什么能够摆脱路由呢?据我所知,就算在 Linux 上,如果不改内核,所有包还是得按路由来,如果想不按路由来,可能需要其它工具的辅助,比如 iptables,policy routing 之类的,这方面我并不熟悉。

from go-tun2socks.

sbilly avatar sbilly commented on June 25, 2024

tap 可以拿到完整的包含(mac 地址在内的以太网包)。

我的环境是中间类似于路由器的设备,但这个设备上没有任何的 IP 地址(物理网卡 / 虚拟网卡上都没有 IP 地址)。我期望从 tap 口拿到包,把整个包 encode 以后放在 udp 包中用 raw_socket 再发出去。

from go-tun2socks.

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.