Pyjo.UserAgent.Proxy - User agent proxy manager

import Pyjo.UserAgent.Proxy

proxy = Pyjo.UserAgent.Proxy.new()
proxy.detect()
print(proxy.http)

Pyjo.UserAgent.Proxy manages proxy servers for Pyjo.UserAgent.

Classes

class Pyjo.UserAgent.Proxy.Pyjo_UserAgent_Proxy(**kwargs)

Pyjo.UserAgent.Proxy inherits all attributes and methods from Pyjo.Base and implements the following new ones.

detect()
proxy = proxy.detect()

Check environment variables HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, NO_PROXY and no_proxy for proxy information. Automatic proxy detection can be enabled with the PYJO_PROXY environment variable.

http = None
http = proxy.http
proxy.http = 'socks://pyjo:secret@127.0.0.1:8080'

Proxy server to use for HTTP and WebSocket requests.

https = None
https = proxy.https
proxy.https = 'http://pyjo:secret@127.0.0.1:8080'

Proxy server to use for HTTPS and WebSocket requests.

is_needed(domain)
boolean = proxy.is_needed('intranet.example.com')

Check if request for domain would use a proxy server.

no = None
no = proxy.no
proxy.no = ['localhost', 'intranet.pyjoyment.net']

Domains that don’t require a proxy server to be used.

prepare(tx)
proxy.prepare(Pyjo.Transaction.HTTP.new())

Prepare proxy server information for transaction.

Pyjo.UserAgent.Proxy.object

alias of Pyjo_UserAgent_Proxy