No project description provided
Project description
Python proxy-server lib
Can be used in cases when it is required to connect from white-ip server go grey-ip client. In fact, the websocket connection is initiated by client and then it is kept alive until program/container is stopped. Any data passed in binary format to client is redirected to server and vice versa. There are two possible options to use this lib: via running separate containers and via importing it from python.
Option with separate containers
- Create Dockerfiles from the following two files with the same config
- Run container with client_side.py on a client machine
- Run container with server_side.py on a server machine
from proxy_connector.connection_config import ConnectionConfig
config = ConnectionConfig(remote_proxy_ip=<ip of a server>,
remote_listen_port=<server listen port>,
remote_forward_port=<internal proxy port>,
local_proxy_ip=<ip of a client>,
local_forward_port=<client listen port>,
local_source_port=<port within container>)
# example
config = ConnectionConfig(remote_proxy_ip="192.168.1.34",
remote_listen_port=4805,
remote_forward_port=61842,
local_proxy_ip="192.168.1.34",
local_forward_port=8008,
local_source_port=12215)
client_side.py
from time import sleep
import threading
from proxy_connector.local_client import ProxyClient
# import config
server = ProxyClient(config)
main_thread = threading.Thread(target=server.start_client)
main_thread.start()
# do something
server.stop_server()
main_thread.join()
server_side.py
from time import sleep
import threading
from proxy_connector.remote_proxy import ProxyServer
# import config
server = ProxyServer(config)
main_thread = threading.Thread(target=server.start_server)
main_thread.start()
# do something
server.stop_server()
main_thread.join()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxy_connector-0.1.0.tar.gz.
File metadata
- Download URL: proxy_connector-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d71033793e3f72f66b480ea30255f6b42e13a369e30b47c26d03b9eed468925
|
|
| MD5 |
e9007ef1d7560b7683502668721e13fc
|
|
| BLAKE2b-256 |
7aad6d081525342f5f1178e575c063d208fbec6a4ac1d63992839c4f04fef518
|
Provenance
The following attestation bundles were made for proxy_connector-0.1.0.tar.gz:
Publisher:
python-publish.yml on technomaticsDevTeam/proxy-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proxy_connector-0.1.0.tar.gz -
Subject digest:
8d71033793e3f72f66b480ea30255f6b42e13a369e30b47c26d03b9eed468925 - Sigstore transparency entry: 448937709
- Sigstore integration time:
-
Permalink:
technomaticsDevTeam/proxy-connector@e32e7c048cdfbe29f2e89fc7febea2d67d0ae6bf -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/technomaticsDevTeam
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e32e7c048cdfbe29f2e89fc7febea2d67d0ae6bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file proxy_connector-0.1.0-py3-none-any.whl.
File metadata
- Download URL: proxy_connector-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f76fa54b525ebcb321227bb0e4925402165a4d40a0ec81a487875ca1dcb72173
|
|
| MD5 |
e57e31e5f2e35300ebad46bd0e88f39a
|
|
| BLAKE2b-256 |
0cd3ef625c42b2a0c44796b5c2de014c8251c8aaaebcae426678786e8d3caacb
|
Provenance
The following attestation bundles were made for proxy_connector-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on technomaticsDevTeam/proxy-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proxy_connector-0.1.0-py3-none-any.whl -
Subject digest:
f76fa54b525ebcb321227bb0e4925402165a4d40a0ec81a487875ca1dcb72173 - Sigstore transparency entry: 448937735
- Sigstore integration time:
-
Permalink:
technomaticsDevTeam/proxy-connector@e32e7c048cdfbe29f2e89fc7febea2d67d0ae6bf -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/technomaticsDevTeam
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e32e7c048cdfbe29f2e89fc7febea2d67d0ae6bf -
Trigger Event:
push
-
Statement type: