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 support for proxy configuration (Socks5) #1359

Open
shachar-radoshinsky-am opened this issue May 23, 2022 · 3 comments
Open

Add support for proxy configuration (Socks5) #1359

shachar-radoshinsky-am opened this issue May 23, 2022 · 3 comments
Assignees
Milestone

Comments

@shachar-radoshinsky-am
Copy link

Hi,
I couldn't find a way to pass proxy information (I'm using Socks5) into the rabbit connection.
Is there a way ?

@lukebakken
Copy link
Member

No, there is no support in Pika for SOCKS. It appears that this library may be able to accomplish it via monkey-patching -

https://pypi.org/project/PySocks/

@lukebakken lukebakken closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2022
@fetzerms
Copy link

fetzerms commented Mar 9, 2023

Hi @lukebakken - I was just digging into this, as I'd like to use Pika behind a (corporate) proxy. Either Socks5 or Http/s-Proxy would be suitable for me.

Monkey-patching with PySocks (as they propose in their readme) does not seem to work, so I guess the right way would be to write an own adapter. But on the other hand, the most calls to socket seem to be in AMQPConnector, which sounds a bit "deep" for me to do some subclassing.

What way would you suggest in order to make pika connect via socks5 proxy?

@lukebakken lukebakken reopened this Mar 9, 2023
@lukebakken lukebakken added this to the 2.0.0 milestone Mar 9, 2023
@lukebakken lukebakken self-assigned this Mar 9, 2023
@lukebakken
Copy link
Member

Monkey-patching with PySocks (as they propose in their readme) does not seem to work

Did you try using PySocks? I never have. If you have code to share that would be great.

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

3 participants