@@ -1784,7 +1784,9 @@ Listed below are a few strategies for using `proxy.py` in your private/productio
1784
1784
1785
1785
> You MUST ` avoid forking ` the repository * "just"* to put your plugin code in ` proxy/plugin ` directory. Forking is recommended workflow for project contributors, NOT for project users.
1786
1786
1787
- Instead, use one of the suggested approaches from below. Then load your plugins using ` --plugin ` , ` --plugins ` flags or ` plugin ` kwargs.
1787
+ - Instead, use one of the suggested approaches from below.
1788
+ - Then load your plugins using ` --plugin ` , ` --plugins ` flags or ` plugin ` kwargs.
1789
+ - See [ skeleton] ( https://github.com/abhinavsingh/proxy.py/tree/develop/skeleton ) app for example standalone project using ` proxy.py ` .
1788
1790
1789
1791
### Via Requirements
1790
1792
@@ -2243,33 +2245,33 @@ usage: -m [-h] [--tunnel-hostname TUNNEL_HOSTNAME] [--tunnel-port TUNNEL_PORT]
2243
2245
[--tunnel-ssh-key-passphrase TUNNEL_SSH_KEY_PASSPHRASE]
2244
2246
[--tunnel-remote-port TUNNEL_REMOTE_PORT] [--enable-events]
2245
2247
[--threadless] [--threaded] [--num-workers NUM_WORKERS]
2246
- [--backlog BACKLOG] [--hostname HOSTNAME] [--port PORT]
2247
- [--port-file PORT_FILE] [--unix-socket-path UNIX_SOCKET_PATH]
2248
- [--local-executor LOCAL_EXECUTOR] [--num-acceptors NUM_ACCEPTORS]
2249
- [--version] [--log-level LOG_LEVEL] [--log-file LOG_FILE]
2250
- [--log-format LOG_FORMAT] [--open-file-limit OPEN_FILE_LIMIT]
2248
+ [--local-executor LOCAL_EXECUTOR] [--backlog BACKLOG]
2249
+ [--hostname HOSTNAME] [--port PORT] [--port-file PORT_FILE]
2250
+ [--unix-socket-path UNIX_SOCKET_PATH]
2251
+ [--num-acceptors NUM_ACCEPTORS] [--version] [--log-level LOG_LEVEL]
2252
+ [--log-file LOG_FILE] [--log-format LOG_FORMAT]
2253
+ [--open-file-limit OPEN_FILE_LIMIT]
2251
2254
[--plugins PLUGINS [PLUGINS ...]] [--enable-dashboard]
2252
- [--enable-ssh-tunnel] [--work-klass WORK_KLASS]
2253
- [--pid-file PID_FILE] [--enable-conn-pool] [--key-file KEY_FILE]
2255
+ [--basic-auth BASIC_AUTH] [--enable-ssh-tunnel]
2256
+ [--work-klass WORK_KLASS] [--pid-file PID_FILE]
2257
+ [--enable-proxy-protocol] [--enable-conn-pool] [--key-file KEY_FILE]
2254
2258
[--cert-file CERT_FILE] [--client-recvbuf-size CLIENT_RECVBUF_SIZE]
2255
2259
[--server-recvbuf-size SERVER_RECVBUF_SIZE] [--timeout TIMEOUT]
2256
- [--enable-proxy-protocol] [--disable-http-proxy]
2257
- [--disable-headers DISABLE_HEADERS] [--ca-key-file CA_KEY_FILE]
2258
- [--ca-cert-dir CA_CERT_DIR] [--ca-cert-file CA_CERT_FILE]
2259
- [--ca-file CA_FILE] [--ca-signing-key-file CA_SIGNING_KEY_FILE]
2260
- [--auth-plugin AUTH_PLUGIN] [--basic-auth BASIC_AUTH]
2261
- [--cache-dir CACHE_DIR]
2262
- [--filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS]
2263
- [--enable-web-server] [--enable-static-server]
2264
- [--static-server-dir STATIC_SERVER_DIR]
2260
+ [--disable-http-proxy] [--disable-headers DISABLE_HEADERS]
2261
+ [--ca-key-file CA_KEY_FILE] [--ca-cert-dir CA_CERT_DIR]
2262
+ [--ca-cert-file CA_CERT_FILE] [--ca-file CA_FILE]
2263
+ [--ca-signing-key-file CA_SIGNING_KEY_FILE]
2264
+ [--auth-plugin AUTH_PLUGIN] [--cache-dir CACHE_DIR]
2265
+ [--proxy-pool PROXY_POOL] [--enable-web-server]
2266
+ [--enable-static-server] [--static-server-dir STATIC_SERVER_DIR]
2265
2267
[--min-compression-length MIN_COMPRESSION_LENGTH]
2266
2268
[--pac-file PAC_FILE] [--pac-file-url-path PAC_FILE_URL_PATH]
2267
- [--proxy-pool PROXY_POOL]
2269
+ [--cloudflare-dns-mode CLOUDFLARE_DNS_MODE]
2270
+ [--filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS]
2268
2271
[--filtered-client-ips FILTERED_CLIENT_IPS]
2269
2272
[--filtered-url-regex-config FILTERED_URL_REGEX_CONFIG]
2270
- [--cloudflare-dns-mode CLOUDFLARE_DNS_MODE]
2271
2273
2272
- proxy.py v2.4.0rc7.dev12+gd234339.d20220116
2274
+ proxy.py v2.4.0rc7.dev28+gfbd7b46.d20220120
2273
2275
2274
2276
options:
2275
2277
-h, --help show this help message and exit
@@ -2299,6 +2301,14 @@ options:
2299
2301
handle each client connection.
2300
2302
--num-workers NUM_WORKERS
2301
2303
Defaults to number of CPU cores.
2304
+ --local-executor LOCAL_EXECUTOR
2305
+ Default: 1. Enabled by default. Use 0 to disable. When
2306
+ enabled acceptors will make use of local (same
2307
+ process) executor instead of distributing load across
2308
+ remote (other process) executors. Enable this option
2309
+ to achieve CPU affinity between acceptors and
2310
+ executors, instead of using underlying OS kernel
2311
+ scheduling algorithm.
2302
2312
--backlog BACKLOG Default: 100. Maximum number of pending connections to
2303
2313
proxy server
2304
2314
--hostname HOSTNAME Default: 127.0.0.1. Server IP address.
@@ -2309,14 +2319,6 @@ options:
2309
2319
--unix-socket-path UNIX_SOCKET_PATH
2310
2320
Default: None. Unix socket path to use. When provided
2311
2321
--host and --port flags are ignored
2312
- --local-executor LOCAL_EXECUTOR
2313
- Default: 1. Enabled by default. Use 0 to disable. When
2314
- enabled acceptors will make use of local (same
2315
- process) executor instead of distributing load across
2316
- remote (other process) executors. Enable this option
2317
- to achieve CPU affinity between acceptors and
2318
- executors, instead of using underlying OS kernel
2319
- scheduling algorithm.
2320
2322
--num-acceptors NUM_ACCEPTORS
2321
2323
Defaults to number of CPU cores.
2322
2324
--version, -v Prints proxy.py version.
@@ -2335,11 +2337,17 @@ options:
2335
2337
Comma separated plugins. You may use --plugins flag
2336
2338
multiple times.
2337
2339
--enable-dashboard Default: False. Enables proxy.py dashboard.
2340
+ --basic-auth BASIC_AUTH
2341
+ Default: No authentication. Specify colon separated
2342
+ user:password to enable basic authentication.
2338
2343
--enable-ssh-tunnel Default: False. Enable SSH tunnel.
2339
2344
--work-klass WORK_KLASS
2340
2345
Default: proxy.http.HttpProtocolHandler. Work klass to
2341
2346
use for work execution.
2342
2347
--pid-file PID_FILE Default: None. Save "parent" process ID to a file.
2348
+ --enable-proxy-protocol
2349
+ Default: False. If used, will enable proxy protocol.
2350
+ Only version 1 is currently supported.
2343
2351
--enable-conn-pool Default: False. (WIP) Enable upstream connection
2344
2352
pooling.
2345
2353
--key-file KEY_FILE Default: None. Server key file to enable end-to-end
@@ -2358,9 +2366,6 @@ options:
2358
2366
--timeout TIMEOUT Default: 10.0. Number of seconds after which an
2359
2367
inactive connection must be dropped. Inactivity is
2360
2368
defined by no data sent or received by the client.
2361
- --enable-proxy-protocol
2362
- Default: False. If used, will enable proxy protocol.
2363
- Only version 1 is currently supported.
2364
2369
--disable-http-proxy Default: False. Whether to disable
2365
2370
proxy.HttpProxyPlugin.
2366
2371
--disable-headers DISABLE_HEADERS
@@ -2388,17 +2393,13 @@ options:
2388
2393
generation of HTTPS certificates. If used, must also
2389
2394
pass --ca-key-file and --ca-cert-file
2390
2395
--auth-plugin AUTH_PLUGIN
2391
- Default: proxy.http.proxy.AuthPlugin. Auth plugin to
2392
- use instead of default basic auth plugin.
2393
- --basic-auth BASIC_AUTH
2394
- Default: No authentication. Specify colon separated
2395
- user:password to enable basic authentication.
2396
+ Default: proxy.http.proxy.auth.AuthPlugin. Auth plugin
2397
+ to use instead of default basic auth plugin.
2396
2398
--cache-dir CACHE_DIR
2397
2399
Default: A temporary directory. Flag only applicable
2398
2400
when cache plugin is used with on-disk storage.
2399
- --filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS
2400
- Default: Blocks Facebook. Comma separated list of IPv4
2401
- and IPv6 addresses.
2401
+ --proxy-pool PROXY_POOL
2402
+ List of upstream proxies to use in the pool
2402
2403
--enable-web-server Default: False. Whether to enable
2403
2404
proxy.HttpWebServerPlugin.
2404
2405
--enable-static-server
@@ -2419,18 +2420,19 @@ options:
2419
2420
this option enables proxy.HttpWebServerPlugin.
2420
2421
--pac-file-url-path PAC_FILE_URL_PATH
2421
2422
Default: /. Web server path to serve the PAC file.
2422
- --proxy-pool PROXY_POOL
2423
- List of upstream proxies to use in the pool
2423
+ --cloudflare-dns-mode CLOUDFLARE_DNS_MODE
2424
+ Default: security. Either "security" (for malware
2425
+ protection) or "family" (for malware and adult content
2426
+ protection)
2427
+ --filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS
2428
+ Default: Blocks Facebook. Comma separated list of IPv4
2429
+ and IPv6 addresses.
2424
2430
--filtered-client-ips FILTERED_CLIENT_IPS
2425
2431
Default: 127.0.0.1,::1. Comma separated list of IPv4
2426
2432
and IPv6 addresses.
2427
2433
--filtered-url-regex-config FILTERED_URL_REGEX_CONFIG
2428
2434
Default: No config. Comma separated list of IPv4 and
2429
2435
IPv6 addresses.
2430
- --cloudflare-dns-mode CLOUDFLARE_DNS_MODE
2431
- Default: security. Either "security" (for malware
2432
- protection) or "family" (for malware and adult content
2433
- protection)
2434
2436
2435
2437
Proxy.py not working? Report at:
2436
2438
https://github.com/abhinavsingh/proxy.py/issues/new
0 commit comments