1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Ma`Proxy
Ma`Proxy is a simple TCP proxy based on Tornado.
Well, maybe not that simple, since it supports:
- TCP -> TCP
simple reverse proxy. Whatever data goes in , goes out
- TCP -> SSL
proxy to encrypt incoming data. a.k.a stunnel
- SSL -> TCP
proxy to decrypt incoming data a.k.a SSL-terminator or SSL-decryptor
- SSL- > SSL
whatever gets in will be decrypted and then encrypted again
Each SSL can be used with SSL certificates. including client-certificates !!
Examples:
// update (Aug 2016) // // It seems that google now returning “HTTP 304” (page moved), // Hence,the google examples won’t work. // In addition, the examples won’t work with sites that check the “HOST” header (since when you connect locally the browser will send HOST: 127.0.0.1)
Let’s start with the simplest example - no bells and whistles - a simple TCP proxy:
#!/usr/bin/env python
import tornado.ioloop
import maproxy.proxyserver
# HTTP->HTTP: On your computer, browse to "http://127.0.0.1:81/" and you'll get http://www.google.com
server = maproxy.proxyserver.ProxyServer("www.google.com",80)
server.listen(81)
print("http://127.0.0.1:81 -> http://www.google.com")
tornado.ioloop.IOLoop.instance().start()
We are creating a proxy (reverse proxy, to be more accurate) that listens locally on port 81 (0.0.0.0:81) and redirect all calls to www.google.com (port 80) . Note that: 1. This is NOT an HTTP-proxy , since it operates in the lower TCP layer . this proxy has nothing to do with HTTP 2. we are actually listening on all the IP addresses, not only on 127.0.0.1 .
Now, Let’s say that you’d like to listen on a “clear” (non-encrypted) connection but connect to an SSL website, for example - create a proxy http://127.0.0.1:82 -> https://127.0.0.1:443 , simply update the “server” line:
#!/usr/bin/env python
import tornado.ioloop
import maproxy.proxyserver
# HTTP->HTTP: On your computer, browse to "http://127.0.0.1:81/" and you'll get http://www.google.com
server = maproxy.proxyserver.ProxyServer("www.google.com",443,server_ssl_options=True)
server.listen(82)
print("http://127.0.0.1:82 -> https://www.google.com",)
tornado.ioloop.IOLoop.instance().start()
Alternatively, you can listen on SSL port and redirect the connection to a clear-text server. In order to listen on SSL-port, you need to specify SSL server-certificates as “client_ssl_options”:
#!/usr/bin/env python
import tornado.ioloop
import maproxy.proxyserver
# HTTPS->HTTP
ssl_certs={ "certfile": "./certificate.pem",
"keyfile": "./privatekey.pem" }
# "client_ssl_options=ssl_certs" simply means "listen using SSL"
server = maproxy.proxyserver.ProxyServer("www.google.com",80,
client_ssl_options=ssl_certs)
server.listen(83)
print("https://127.0.0.1:83 -> http://www.google.com")
tornado.ioloop.IOLoop.instance().start()
In the “demos” section of the source-code, you will also find:
how to connect using SSL client-certificate
how to inherit the “Session” object (that we internally use) and create a logging-proxy (proxy that logs everything) .
Installation:
pip install maproxy
Source Code: https://github.com/zferentz/maproxy
Contact Me: zvika d-o-t ferentz a-t gmail d,o,t com (if you can’t figure it out - please don’t contact me :) )
Metadata
Release files for maproxy 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maproxy-0.0.12.zip | 23.0 kB | Without provenance | Details for maproxy-0.0.12.zip |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| maproxy-0.0.12.win-amd64.exe | Details for maproxy-0.0.12.win-amd64.exe | |||
| maproxy-0.0.12.win32.exe | Details for maproxy-0.0.12.win32.exe | |||
| maproxy-0.0.12-py3.4.egg | Legacy Egg format | - | - | Details for maproxy-0.0.12-py3.4.egg |
| maproxy-0.0.12-py2.7.egg | Legacy Egg format | - | - | Details for maproxy-0.0.12-py2.7.egg |
Total release size: 409.4 kB
Release files / maproxy-0.0.12.zip
| Download URL | maproxy-0.0.12.zip |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f584cc3d29ba4168ef0d4d205c59c6331ca9b44104d0c160af6898dc4bf830e1
|
|
BLAKE2b-256 checksum How to use checksums |
2e1241e87a13b3e64373f73029ad1e826084afa64d4cdfa17baadc3ccde2ee02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / maproxy-0.0.12.win-amd64.exe
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | maproxy-0.0.12.win-amd64.exe |
|---|---|
| Size | 147.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
200658719df20e8b716a1723603d19b390c247e2447f64133c632c309afd64a1
|
|
BLAKE2b-256 checksum How to use checksums |
28cec58a0f5a6bbd9a25ef50473dcd52830a4e5222f567190b680625f19e52e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / maproxy-0.0.12.win32.exe
| Download URL | maproxy-0.0.12.win32.exe |
|---|---|
| Size | 201.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ac22f1d3156f9bddabc98c166ce40b6374b4d6a4d7a443c78d21752f3523bcb
|
|
BLAKE2b-256 checksum How to use checksums |
26561208e5b15ba647382714090633536a2e1cc5d8bd30d4a7eb74fdda8c1212
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / maproxy-0.0.12-py3.4.egg
| Download URL | maproxy-0.0.12-py3.4.egg |
|---|---|
| Size | 18.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
a60a6945944f0e31e077df98c3c3595761952a4b033533334395036004fcb2cf
|
|
BLAKE2b-256 checksum How to use checksums |
270d7a7f55686d74ded659820cc3d2500bc3c639ba991a5f5f30e4fd0fa32be3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / maproxy-0.0.12-py2.7.egg
| Download URL | maproxy-0.0.12-py2.7.egg |
|---|---|
| Size | 18.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
af4c3f5549457558d2232866bff25ea7d9a849f59177a83a67bf6da564a13578
|
|
BLAKE2b-256 checksum How to use checksums |
81f5a42374faa009601fafb6cfea215d07e043c2982b9bd681587d5ba09177b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for maproxy 0.0.12
Upload timing
Release file added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.