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

Add HTTP & SOCKS5 proxy support #4321

Merged
merged 5 commits into from
Feb 11, 2023
Merged

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jan 21, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

This PR adds an environment variable CHATTERINO2_PROXY_URL that can be used to specify a proxy (e.g. socks5://127.0.0.1:1080). The behaviour is similar to curl's CURLOPT_PROXY.

Partially fixes #450 since not all connections are proxied.

You can test this e.g. with mitmproxy.

Example Config
# ~/.mitmproxy/config.yml
listen_host: 127.0.0.1
mode: [regular] # or [socks5]
proxyauth: 'forsen:xqc' # optional
tcp_hosts:
  - 'irc.chat.twitch.tv' # don't interpret IRC as HTTP traffic

TODO Before Merge

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/common/Env.hpp Show resolved Hide resolved
@pajlada
Copy link
Member

pajlada commented Jan 21, 2023

HTTP proxies seem to be the most common, so since websocketpp supports HTTP proxies we should support that in this PR too

@pajlada pajlada changed the title Add Support for HTTP and Socks5 Proxies Add HTTP & SOCKS5 proxy support Feb 11, 2023
@pajlada pajlada enabled auto-merge (squash) February 11, 2023 23:13
@pajlada pajlada merged commit c9a9e44 into Chatterino:master Feb 11, 2023
@Nerixyz Nerixyz deleted the feat/proxy branch February 14, 2023 19:51
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.

Feature Request: Proxy setup
2 participants