Skip to content

Instantly share code, notes, and snippets.

@illicitonion
Created January 25, 2012 13:42
Show Gist options
  • Select an option

  • Save illicitonion/1676307 to your computer and use it in GitHub Desktop.

Select an option

Save illicitonion/1676307 to your computer and use it in GitHub Desktop.
class ProxyType:
@classmethod
def make(cls, ff_value, string):
return {'ff_value': ff_value, 'string': string}
DIRECT = make(0, 'direct') # Direct connection, no proxy (default on Windows).
MANUAL = make(1, 'manual') # Manual proxy settings (e.g., for httpProxy).
PAC = make(2, 'pac') # Proxy autoconfiguration from URL.
RESERVED_1 = make(3, 'reserved1') # Never used.
AUTODETECT = make(4, 'autodetect') # Proxy autodetection (presumably with WPAD).
SYSTEM = make(5, 'system') # Use system settings (default on Linux).
UNSPECIFIED = make(6, 'unspecified')
class ProxyType:
@classmethod
def ProxyType.make(cls, ff_value, string):
return {'ff_value': ff_value, 'string': string}
DIRECT = ProxyType.make(0, 'direct') # Direct connection, no proxy (default on Windows).
MANUAL = ProxyType.make(1, 'manual') # Manual proxy settings (e.g., for httpProxy).
PAC = ProxyType.make(2, 'pac') # Proxy autoconfiguration from URL.
RESERVED_1 = ProxyType.make(3, 'reserved1') # Never used.
AUTODETECT = ProxyType.make(4, 'autodetect') # Proxy autodetection (presumably with WPAD).
SYSTEM = ProxyType.make(5, 'system') # Use system settings (default on Linux).
UNSPECIFIED = ProxyType.make(6, 'unspecified')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment