Skip to content

[Question]How to connect with HTTP proxy! #36408

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

Closed
iAmSKU opened this issue Jan 6, 2020 · 1 comment
Closed

[Question]How to connect with HTTP proxy! #36408

iAmSKU opened this issue Jan 6, 2020 · 1 comment

Comments

@iAmSKU
Copy link

iAmSKU commented Jan 6, 2020

What version of Go are you using (go version)?

go version: go1.13.5 linux/amd64

Does this issue reproduce with the latest release?

NA

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

I was using "x/net/proxy" to connect with the "http_proxy".

I have refered following proxy page and corresponding examples:
https://godoc.org/golang.org/x/net/proxy

To get proxy information I have set environment variable "all_proxy" to the the desired proxy "http://192.30.20.10:5000", and performed the tcp connection, but following error raised:

[Network Error : socks connect tcp 192.30.20.10:5000->mx.eu1.mico.io:8883: read tcp 172.17.0.2:48118->192.30.20.10:5000: read: connection reset by peer]

I saw a similar proposal for the same, in the another thread:
#19504

As per the above threads "http_proxy" support is not available instead of "SOCKS5" proxy is supported. I have tried similar implementation for "http_proxy", but unfortunately it does not worked.

Please suggest how to use "http_proxy" or "https_proxy" to connect with TCP/TLS?

What did you expect to see?

Able to connect to the proxy environment

What did you see instead?

Unable to connect to the proxy environment, time out/connection reset.

@ALTree
Copy link
Member

ALTree commented Jan 6, 2020

Hi,

the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.

Please see the Questions wiki page; it has a list of good places for asking questions. Thanks!

Closing here, since this is not a bug.

@ALTree ALTree closed this as completed Jan 6, 2020
@golang golang locked and limited conversation to collaborators Jan 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants