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

socks5 support #2543

Merged
merged 2 commits into from
Dec 20, 2024
Merged

socks5 support #2543

merged 2 commits into from
Dec 20, 2024

Conversation

dmitrodem
Copy link
Contributor

Golang implementation of http.Client does not handle socks5 support via LD_PRELOAD (a.k.a. tsocks/proxychains). Proposed patch adds explicit socks5 support via environment variable, e.g. SOCKS5_PROXY=localhost:1080 yay -Ss vivado.

socks5 support via environment variable, e.g. SOCKS5_PROXY=localhost:1080 yay ...
@dmitrodem dmitrodem requested a review from Jguer as a code owner December 3, 2024 19:09
@@ -39,10 +41,20 @@ func NewRuntime(cfg *settings.Configuration, cmdArgs *parser.Arguments, version
logger := text.NewLogger(os.Stdout, os.Stderr, os.Stdin, cfg.Debug, "runtime")
runner := exe.NewOSRunner(logger.Child("runner"))

var transport = &http.Transport{}
Copy link
Owner

@Jguer Jguer Dec 19, 2024

Choose a reason for hiding this comment

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

Can you copy the default transport? I think this works

http.DefaultTransport.(*http.Transport).Clone() 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

of course it is possible. I'm not an expert in Go at all :)

@Jguer Jguer merged commit 3f2f6ea into Jguer:next Dec 20, 2024
1 check passed
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