-
Notifications
You must be signed in to change notification settings - Fork 65
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
Support for HTTP proxies #162
Comments
I'd happily accept a PR for it if it's put in cleanly. |
I'm afraid I would need a little hand-holding for that. I know enough about how HTTP proxies work to find the missing parts, but I would need to know at least where to make changes in irc-framework. |
You would be looking for the net transport. Here's where it uses the Socks proxy, https://github.com/kiwiirc/irc-framework/blob/master/src/transports/net.js#L83 |
When I take a look at other projects, the HTTP CONNECT protocol is simple enough that everyone just implements it themselves, so sadly there are no libraries for it. The most annoying bit is parsing the environment, see https://github.com/request/request/blob/master/lib/getProxyFromURI.js. To save time, I would love to re-use that code (unfortunately it needs minor modification to convert the "http" case to "any protocol" and probably drop the https, which we do not need (its only effect is to use different environment variables). Unfortunately it is Apache 2.0, not MIT. I could ask the authors if converting is alright. |
In fact, most of the code linked above is "no proxy" variable handling. And it doesn't handle authentication. |
Ah, the authentication is pushed elsewhere. Quite a lot of code there after all for more generic handling than we need. I will try writing something from scratch at the risk of missing out on features I don't use myself. In fact I don't have easy access to a proxy requiring authentication. Would you be able to live with commented out authentication code? |
I assume that the "test" folder in the git sources is the answer to my question about testing. |
Is supporting HTTP proxies in irc-framework something realistic?
The text was updated successfully, but these errors were encountered: