0

how do I use pymongo behind proxy that require authentication?

I am able to find settings for ssh tunnel servers, such as How to connect remote mongodb with pymongo

But I am working on a environment that is behind a firewall that need to use proxy authentication. How do I config for that? For OSX terminal I use something similar to this:

export http_proxy="username:password@ip address:port number"

I find this new feature for socks5 proxy authentication https://jira.mongodb.org/browse/CSHARP-734, but I am just looking for basic or NTLM authentication methods, is it supported?

echo
  • 617
  • 8
  • 19

1 Answers1

0

pymongo does not use http protocol. You can not use http_proxy.

See https://jira.mongodb.org/browse/PYTHON-1182 for details.

But you can use socks5 proxy

for example:i use v2rayN + proxifier on my windows

enter image description here

enter image description here

enter image description here

lisonge
  • 106
  • 1
  • 7