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(client): disable TCP Keep-Alive to save battery #2000

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

fortuna
Copy link
Collaborator

@fortuna fortuna commented Apr 24, 2024

Fixes the client-side of Jigsaw-Code/outline-ss-server#108

We should probably also reduce the duration on the server-side.

@fortuna fortuna requested a review from jyyi1 April 24, 2024 20:33
@fortuna fortuna requested a review from a team as a code owner April 24, 2024 20:33
"github.com/Jigsaw-Code/outline-sdk/transport"
"github.com/Jigsaw-Code/outline-sdk/transport/shadowsocks"
)

// newOutlineStreamDialer creates a [transport.StreamDialer] that connects to the remote proxy using `config`.
func newOutlineStreamDialer(config *transportConfig) (transport.StreamDialer, error) {
dialer, err := shadowsocks.NewStreamDialer(&transport.TCPEndpoint{Address: config.RemoteAddress}, config.CryptoKey)
// We disable Keep-Alive as per https://datatracker.ietf.org/doc/html/rfc1122#page-101, which states that it should only be
Copy link
Contributor

@jyyi1 jyyi1 Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remembered we should have already removed all code from outline/device? #1972

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I was on an outdated master. Updated.

@fortuna fortuna changed the title fix(client): disable TCP Keep-Alive feat(client): disable TCP Keep-Alive to save battery Apr 25, 2024
@fortuna fortuna merged commit cbec5b7 into master Apr 25, 2024
23 checks passed
@fortuna fortuna deleted the fortuna-keep branch April 25, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants