Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): tcp fast open on direct outbounds #1258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

haruue
Copy link
Collaborator

@haruue haruue commented Nov 23, 2024

close: #1255

outbounds:
  - name: direct
    type: direct
    direct:
      fastOpen: true

Note

This option effectively breaks proxy semantics just like sniff and client-side fastOpen. All proxy requests will be accepted immediately without checking whether the target is reachable or not.

For the best effect of this option, the client-side fastOpen option should also be enabled.

When used on a Linux server, the following sysctl is required:

sysctl net.ipv4.tcp_fastopen=3

Please also have a look on the upstream notes related to Windows and Go 1.23: https://github.com/database64128/tfo-go?tab=readme-ov-file#windows-support-with-go-123-and-later

Personally, I'd recommend putting this option in the our Performance document, rather than encouraging every user to enable it.

tfo-go caches the "unsupported" status when fallback mode is enabled.
In other words, if the hysteria server is started with
net.ipv4.tcp_fastopen=0 and it fails once, the tfo will not be enabled
until it is restarted, even if the user later sets sysctl
net.ipv4.tcp_fastopen=3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tcp fastopen sockopt on server
2 participants