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: create SOCKS5 StreamDialer #44

Merged
merged 8 commits into from
Aug 19, 2023
Merged

feat: create SOCKS5 StreamDialer #44

merged 8 commits into from
Aug 19, 2023

Conversation

fortuna
Copy link
Contributor

@fortuna fortuna commented Aug 12, 2023

Needs test

@fortuna fortuna requested a review from jyyi1 August 12, 2023 16:48
@fortuna fortuna changed the title Create SOCKS5 Dialers feature: create SOCKS5 Dialers Aug 13, 2023
@fortuna fortuna changed the title feature: create SOCKS5 Dialers feat: create SOCKS5 Dialers Aug 13, 2023
"net"

"github.com/Jigsaw-Code/outline-sdk/transport"
"golang.org/x/net/proxy"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh it seems like the proxy library doesn't currently support UDP, so it may make sense to revert this for now: https://cs.opensource.google/go/x/net/+/master:internal/socks/socks.go;l=233;drc=126a5f3b343c940b1ce677f43b138556311b0999

@fortuna fortuna requested a review from jyyi1 August 17, 2023 21:25
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

LGTM, we support one more protocol now!

@fortuna fortuna requested a review from jyyi1 August 18, 2023 22:35
@fortuna
Copy link
Contributor Author

fortuna commented Aug 18, 2023

Please take another look. I added unit tests!
And removed the PacketDialer, since the library doesn't support it.

Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

The tests look good, but it is failing.

}()

// Client
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit it seems we don't need put to client logic in the go func, because server is already running concurrently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's clearer to have the client and server well delineated.

Copy link
Contributor Author

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Tests fixed!

}()

// Client
go func() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's clearer to have the client and server well delineated.

@fortuna fortuna requested a review from jyyi1 August 18, 2023 23:59
@fortuna fortuna changed the title feat: create SOCKS5 Dialers feat: create SOCKS5 StreamDialer Aug 19, 2023
@fortuna fortuna merged commit ab1e88d into main Aug 19, 2023
6 checks passed
@fortuna fortuna deleted the fortuna-socks5 branch August 19, 2023 00:17
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.

2 participants