-
Notifications
You must be signed in to change notification settings - Fork 206
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
google-cloud-pubsub SDK message pull is not working with SOCKS5 proxy #943
Comments
Can you try setting passing an httplib2.http object with the proxy_info parameter as decribed here in this similar issue? googleapis/google-api-python-client#569 (comment) |
@acocuzzo I tried following script but not working.
|
If you are trying the method used in: googleapis/google-api-python-client#569 (comment), I believe the use of "authorize" method requires like the use of the oauth2client.service_account package However I don't think that credentials object can be passed to the normal SubscriberClient (imported via "from google.cloud As a mitigation, one option would be to use the underlying auto-generated client which can be imported via "from google import pubsub_v1", and used like so:
Specifically you can pass this SubscriberClient, a transport of type Optional[Union[str, SubscriberTransport]] The transport parameter can be set to a SubscriberGrpcTransport, which takes a "channel" parameter, which is a grpc.Channel
Please note that the "credentials" parameter is ignore when the "channel" argument is present. This grpc.Channel object can be constructed with the SubscriberGrpcTransport.create_channel method, which accepts a "credentials" argument as well as the the keyword argument "options". Options is an optional list of key-value pairs (channel_arguments in gRPC Core runtime) to configure the channel. The "grpc.http_proxy" key can be include in this list of options, please see all options are described here: |
We are trying to build a pubsub integration to pull messages with proxy support using Pub/Sub SDK. It works fine with HTTP_PROXY but does not work with SOCKS5 proxy without internet connectivity.
Environment details
google-cloud-pubsub
version: 2.17.1Steps to reproduce
Use the mentioned code example to check the issue, but it is not working when the VM internet is off. The script works with HTTP_PROXY.
Code example
Stack trace
We tried to find the documents about the proxies supported by this SDK but had no luck.
Thanks!
The text was updated successfully, but these errors were encountered: