Skip to main content

PacGen: Pac file generator written in Python

If you use multiple proxies and you want to define rules to set specific proxy per specific host, this package can help you. Simply create a ~/.pacgen.yml config file and define your rules there. After that run updatepac command in your terminal and it will create ~/.proxy.pac

Installation

    pip install pacgen

Sample ~/.pacgen.yml

proxies:
  ssh_tunnel: socks5://127.0.0.1:1081
  shadowsocks: socks5://127.0.0.1:1080
  httpproxy: http://127.0.0.1:1082
routes:
  172.19.20.10: ssh_tunnel
  youtube.com: shadowsocks
  viemo.com: shadowsocks
  news.com: httpproxy
# default_proxy will be used for hosts which are not defined in routes.
default_proxy: shadowsocks
# here we define hosts that we don't want to use proxy for them.
excludes:
  - bank.com
  - lastpass.com

Release files for PacGen 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PacGen 0.1.3
File Size Uploaded
PacGen-0.1.3.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PacGen 0.1.3
File Interpreter ABI Platform
PacGen-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / PacGen-0.1.3.tar.gz

Download URL PacGen-0.1.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ad106150d8daa78b30a1cd4d43c4fd20e65c1496fed8f3bfbe19cceb77f4f1b4
BLAKE2b-256 checksum
How to use checksums
9a03d0f994eb4e2385fca00dd285028bed5ce172b6e80f1ed62dd8cbda5ec00e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Release files / PacGen-0.1.3-py3-none-any.whl

Download URL PacGen-0.1.3-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a46cfcf9ce4dcab89ce70e704b10396e2c7ac1fbcd0e9b6bd2c3cd9b84d2ec04
BLAKE2b-256 checksum
How to use checksums
f0906a2aa87aede37394e1282164b7c18a6dba80d5c56233f6a2231d712440c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page