A socket proxy with wake-on-lan feature.
Project description
wol-socket-proxy
A socket proxy with wake-on-lan feature.
It can forward TCP(bidirectional) and UDP(send-only) traffic from local machine to remote machine, and send a magic packet to wake it (wake-on-lan) before forwarding traffic if the remote machine does not respond to ICMP ping.
Requirements
Python 3.11+
The remote machine must accept and respond to ICMP ping requests.
Usage
You can install it from PyPI or use a prebuilt docker image.
Install from PyPI
Simply install it:
pip install wolsocketproxy
Then create a config file:
cp wolsocketproxy.conf.example /etc/wolsocketproxy.conf
Modify the config file as your requirements.
Finally, run it:
wolsocketproxy
Use prebuilt docker image
See docker/docker-compose.yml
for more details.
Config
The wolsocketproxy.conf
has the following structure:
{
// NOTE: Comments are not allowed in actual config file
// Define forwarding routes
"routes": [
{
"local_address": "0.0.0.0", // The local address to listen
"local_port": 12345, // The local port to listen
"target_address": "192.168.0.100", // The target address forwarding to
"target_port": 22, // The target port forwarding to
"protocol": "tcp" // The protocol to use
},
// ... more routes ...
],
// Tell the program about the MAC address of each IP in routes
"mac_mappings": {
// Key is IP address, and value is MAC address, case-insensitive
"192.168.0.100": "11:22:33:44:55:66",
// ... more items ...
}
}
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
File details
Details for the file wolsocketproxy-0.1.1.tar.gz
.
File metadata
- Download URL: wolsocketproxy-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.7-300.fc41.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1ef98cbdc5c911d4318fd4c1fc2e1ec8865bf741475c321fb83a68b386f3e6 |
|
MD5 | bdaa9f1a14e917c8adbb28e6282686fa |
|
BLAKE2b-256 | 392a8b6d528619f15050d0693f96f5b62aafed7af86f0ea46612c807f0b4bce2 |
File details
Details for the file wolsocketproxy-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: wolsocketproxy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.7-300.fc41.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd5d571ca60a2f6e3587a1f8eca14000c33f18207d3e48e25acdd8463f1056a |
|
MD5 | db1433abd4b2051d28d1ead822e035a6 |
|
BLAKE2b-256 | d940ee25c8ff668e8562a04eb160ae7a4a768cb3c72d8ef0359e84082fbad8ab |