Skip to content
New issue

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

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

Already on GitHub? # to your account

Spawn multiple gost processes in a single command with -- #145

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

caribpa
Copy link
Contributor

@caribpa caribpa commented Dec 13, 2022

Hi!

This PR is basically #64 but using processes instead of goroutines as preferred by the gost author: #64 (comment)

The code changes are minimal and don't require adapting any of the go-gost libraries! Adding only two functions is all that it takes: https://go.dev/play/p/vJRKMjSrPR3

In a nutshell, this is what this PR allows you to do:

# Server
gost -L sshd://:2222

# Client
gost -L socks5://127.0.0.1:1111 -- -L rtcp://127.0.0.1:3333/127.0.0.1:1111 -F sshd://<server-ip>:2222

# Test from Server
curl -s -L -x socks5://127.0.0.1:3333 https://example.com

instead of having to manually launch separate processes:

# Server
gost -L sshd://:2222

# Client - Terminal/Process 1
gost -L rtcp://127.0.0.1:3333/127.0.0.1:1111 -F sshd://<server-ip>:2222

# Client - Terminal/Process 2
gost -L socks5://127.0.0.1:1111

# Test from Server
curl -s -L -x socks5://127.0.0.1:3333 https://example.com

If merged, I will also port these changes to gost v2 as the PR ginuerzh/gost#713 was implemented using goroutines 😀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants