You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there.
I want to specify proxy address for websocket connection instead of setting environment variables http_proxy and https_proxy. I copied code from#107 and it's like:
dg.Dialer=&websocket.Dialer{
Proxy: http.ProxyURL(&url.URL{
Scheme: "http", // or "https" depending on your proxyHost: "localhost:7890",
}),
}
I have also tried to use https but it still doesn't work. However, if use http_proxy and https_proxy env variables with http.ProxyFromEnvironment, it works fine. code snippet:
I want to specify proxy address for websokct addres instead of setting environment variables http_proxy and https_proxy. Because it affects other http connection that don't want to go through the proxy.
Steps To Reproduce
No response
Anything else?
I am using discordgo which uses this repo inside. So it maybe not a right place to open the issue here. Hope someone could explain why setting proxy for Dialer does not work as I expect.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
Hi there.
I want to specify proxy address for websocket connection instead of setting environment variables
http_proxy
andhttps_proxy
. I copied code from#107 and it's like:I have also tried to use
https
but it still doesn't work. However, if usehttp_proxy
andhttps_proxy
env variables withhttp.ProxyFromEnvironment
, it works fine. code snippet:Expected Behavior
I want to specify proxy address for websokct addres instead of setting environment variables http_proxy and https_proxy. Because it affects other http connection that don't want to go through the proxy.
Steps To Reproduce
No response
Anything else?
I am using discordgo which uses this repo inside. So it maybe not a right place to open the issue here. Hope someone could explain why setting proxy for
Dialer
does not work as I expect.The text was updated successfully, but these errors were encountered: