Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wolsocketproxy-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

wolsocketproxy-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file wolsocketproxy-0.1.0.tar.gz.

File metadata

  • Download URL: wolsocketproxy-0.1.0.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

Hashes for wolsocketproxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c32d281f049020add5e141f700fbf13252ee31db3fc289c3f1019a492608c67
MD5 0520340bd575de923123dc917982b252
BLAKE2b-256 cc0ac431226feebca8173800dccb79013d35b873aad735be8391985e9d7719a5

See more details on using hashes here.

File details

Details for the file wolsocketproxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wolsocketproxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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

Hashes for wolsocketproxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82207e73f3fe14cfedc93e8269cfe7a3ab2b2ec572d2113372c7f9b63b77ee32
MD5 ca9b5576f97cc2dd0f891114376cd7e5
BLAKE2b-256 eeb94e972f07b57fe68a4686c1d6889ce354938a1bf64564afc92fa7c8d9611c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page