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

HTTP proxy #158

Open
1tgr opened this issue Jan 9, 2018 · 6 comments
Open

HTTP proxy #158

1tgr opened this issue Jan 9, 2018 · 6 comments

Comments

@1tgr
Copy link

1tgr commented Jan 9, 2018

Can I use the client to connect via an HTTP proxy? e.g. in a corporate environment direct connections aren't possible.

@kellerkindt
Copy link

kellerkindt commented Jan 18, 2019

You can, but you need to update your proxy settings.
I am using it behind an nginx server with the following configuration needed:

nginx.conf

http {
# ...
        map $http_upgrade $connection_upgrade {
                default upgrade;
                '' close;
        }
}

sites-enabled/default

server {
# ...
                location /websocket {
                        proxy_pass http://TARGET_IP:TARGET_PORT/TARGET_URI;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "Upgrade";
                        proxy_connect_timeout 7d;
                        proxy_read_timeout 7d;
                        proxy_send_timeout 7d;
                }
}

@1tgr
Copy link
Author

1tgr commented Jan 18, 2019

Thanks, I was looking to use a proxy from the client, ie to connect out to the internet via the HTTP CONNECT verb.

@vi
Copy link
Member

vi commented Jan 18, 2019

@1tgr For this you can use rust-websocket with custom underlying connection.

@1tgr
Copy link
Author

1tgr commented Jan 18, 2019

Indeed, that's what I'm doing.

@timvisee
Copy link
Contributor

@1tgr Could you provide an example for what you're currently using to connect through an HTTP proxy?

@igitur
Copy link

igitur commented Jun 23, 2021

@1tgr Could you provide an example for what you're currently using to connect through an HTTP proxy?

FYI, Tim needs to know this so that he can improve his awesome ffsend tool. He's just too humble to say it himself.

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

No branches or pull requests

5 participants