Giter Site home page Giter Site logo

TCP-based transport? about geph2 HOT 5 CLOSED

geph-official avatar geph-official commented on August 24, 2024
TCP-based transport?

from geph2.

Comments (5)

nullchinchilla avatar nullchinchilla commented on August 24, 2024

One hack could just be KCP-X over TCP over ScrambleSuit. That way roaming isn't such a biggie. The usual pitfalls of TCP over TCP don't exactly apply since we use link modeling rather than loss-based cwnd control, and (bbr/vegas-based) TCP isn't so different from something like LTE in that respect. We could turn off all fast and early retransmits as an optimization (RTO retransmits are highly suppressed in KCP-X anyway) and use multiple TCP connections that open and close often. This should prevent us from triggering "long persistent connection" heuristics.

A better approach might be to do a proper multipath-TCP type protocol, where the onion routing is actually on unordered packets rather than streams, and KCP-X is end-to-end. That way, TCP and UDP bridges would just be "physical links" and complex ad-hoc logic wouldn't be needed. That might be very complex though, and is definitely a "geph3" type project.

from geph2.

nullchinchilla avatar nullchinchilla commented on August 24, 2024

One thing we could do is actually introduce "TCP primacy", and have clients connect over ScrambleSuit to negotiate KCP-X sessions on other ports both over TCP and UDP. This might have fingerprinting implications, but it'll also simplify the really brittle N4 handshake logic that's the source of countless bugs.

A more backwards-compatible approach might actually be N4/KCP-X primacy, but that does require more long-term maintenance of the crappy N4 handshake and crypto code. In any case the "subsidiary" streams would have really simple crypto since no handshakes are needed anymore.

from geph2.

NoneSloth avatar NoneSloth commented on August 24, 2024

I have not read the code yet, but if all geph need is an unreliable datagram, can we use raw socket with fake TCP headers?

In that way, we have all benefits of UDP (roaming, better latency with TCP-over-UDP), and at the same time, we can make the router thinks that we are sending TCP segments.

Not an expert, just wondering if this is doable.

from geph2.

nullchinchilla avatar nullchinchilla commented on August 24, 2024

Custom/fake TCP is bad since it's a fingerprint that can be used to identify and block Geph.

from geph2.

nullchinchilla avatar nullchinchilla commented on August 24, 2024

A TCP-first approach has been pushed in e4639b2. In a future version of gephgui, clients will always first connect via TCP to bridges and then negotiate the next protocol.

from geph2.

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.