wultiplexor


Namewultiplexor JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/vd2org/wultiplexor
SummaryThis tool is for forwarding TCP or SOCK connections from one computer to another using a central web socket server.
upload_time2024-02-26 11:48:59
maintainer
docs_urlNone
author
requires_python<3.13,>=3.8
licenseCopyright 2024 Vd <wultiplexor@vd2.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords proxy gate gateway websocket network networking websockets tcp socks forward forwarding tunnel tunneling tunnelling multiplex multiplexing multiplexer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Wultiplexor

## What?

Wultiplexor is a reverse proxy server and client that uses websockets to multiplex tcp connections or unix sockets.
You can use it to forward connections from one machine to another both behind NAT or firewall.

## How?

<picture>
  <img alt="Diagram" src="diagram.png">
</picture>

## Why?

In the beginning, I had needed to redirect a unix socket for one specific application. 
Later I implemented this in a general way.

## Deploy server using docker compose

```shell
docker network create wultiplexor
DOMAIN=wultiplexor.example.com ACME_EMAIL=acme@example.com SECRET=sEcReTkEy docker compose -p wultiplexor -f compose.yaml up --build -d
```

**WARNING:** The server is not intended to be used "as is" in a public accessible infrastructure. 
Use a reverse proxy like [Traefik](https://github.com/traefik/traefik) to secure the connection like I did in the `compose.yaml` file.

## Install the client utility

```shell
pip install wultiplexor
```

## Usage: Forward tcp port

- On one machine, called the server or acceptor:

```shell
whannel ws://example.com/ acceptor -s sEcReTkEy localhost 8080 sEcReTGaTeWaYnAmeE
```

```shell
nc -l 8080
```

- On another machine, called client or requestor:

```shell
whannel ws://example.com/ requestor sEcReTGaTeWaYnAmeE 9090
```

```shell
nc localhost 9090
```

And now you can chat between two machines.

## Usage: Forward unix socket file

- On one machine, called the server or acceptor:

```shell
whannel wss://example.com/ sock-acceptor -s sEcReTkEy ./server sEcReTGaTeWaYnAmeE
```

```shell
socat UNIX-LISTEN:./server,fork STDIO
```

- On another machine, called client or requestor:

```shell
whannel wss://example.com/ sock-requestor sEcReTGaTeWaYnAmeE ./client
```

```shell
socat STDIO UNIX-CONNECT:./client
```

And now you can chat between two machines.

## Mixed usage

You can mix unix sockets and tcp ports. To do that, use tcp-acceptor from one side and sock-requestor from the another. 
Or vice versa. This is also a way to "convert" a unix socket to a tcp port on the same machine.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vd2org/wultiplexor",
    "name": "wultiplexor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<3.13,>=3.8",
    "maintainer_email": "",
    "keywords": "proxy gate gateway websocket network networking websockets tcp socks forward forwarding tunnel tunneling tunnelling multiplex multiplexing multiplexer",
    "author": "",
    "author_email": "Vd <wultiplexor@vd2.org>",
    "download_url": "https://files.pythonhosted.org/packages/f6/2f/ffe581cc7df6b66557b117ee5cec9d48290e98a4c5d4dc2ed441f1f7bd5a/wultiplexor-0.1.0.tar.gz",
    "platform": null,
    "description": "# Wultiplexor\n\n## What?\n\nWultiplexor is a reverse proxy server and client that uses websockets to multiplex tcp connections or unix sockets.\nYou can use it to forward connections from one machine to another both behind NAT or firewall.\n\n## How?\n\n<picture>\n  <img alt=\"Diagram\" src=\"diagram.png\">\n</picture>\n\n## Why?\n\nIn the beginning, I had needed to redirect a unix socket for one specific application. \nLater I implemented this in a general way.\n\n## Deploy server using docker compose\n\n```shell\ndocker network create wultiplexor\nDOMAIN=wultiplexor.example.com ACME_EMAIL=acme@example.com SECRET=sEcReTkEy docker compose -p wultiplexor -f compose.yaml up --build -d\n```\n\n**WARNING:** The server is not intended to be used \"as is\" in a public accessible infrastructure. \nUse a reverse proxy like [Traefik](https://github.com/traefik/traefik) to secure the connection like I did in the `compose.yaml` file.\n\n## Install the client utility\n\n```shell\npip install wultiplexor\n```\n\n## Usage: Forward tcp port\n\n- On one machine, called the server or acceptor:\n\n```shell\nwhannel ws://example.com/ acceptor -s sEcReTkEy localhost 8080 sEcReTGaTeWaYnAmeE\n```\n\n```shell\nnc -l 8080\n```\n\n- On another machine, called client or requestor:\n\n```shell\nwhannel ws://example.com/ requestor sEcReTGaTeWaYnAmeE 9090\n```\n\n```shell\nnc localhost 9090\n```\n\nAnd now you can chat between two machines.\n\n## Usage: Forward unix socket file\n\n- On one machine, called the server or acceptor:\n\n```shell\nwhannel wss://example.com/ sock-acceptor -s sEcReTkEy ./server sEcReTGaTeWaYnAmeE\n```\n\n```shell\nsocat UNIX-LISTEN:./server,fork STDIO\n```\n\n- On another machine, called client or requestor:\n\n```shell\nwhannel wss://example.com/ sock-requestor sEcReTGaTeWaYnAmeE ./client\n```\n\n```shell\nsocat STDIO UNIX-CONNECT:./client\n```\n\nAnd now you can chat between two machines.\n\n## Mixed usage\n\nYou can mix unix sockets and tcp ports. To do that, use tcp-acceptor from one side and sock-requestor from the another. \nOr vice versa. This is also a way to \"convert\" a unix socket to a tcp port on the same machine.\n",
    "bugtrack_url": null,
    "license": "Copyright 2024 Vd <wultiplexor@vd2.org>\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy of\n        this software and associated documentation files (the \"Software\"), to deal in\n        the Software without restriction, including without limitation the rights to\n        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n        the Software, and to permit persons to whom the Software is furnished to do so,\n        subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "This tool is for forwarding TCP or SOCK connections from one computer to another using a central web socket server.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/vd2org/wultiplexor",
        "Issues": "https://github.com/vd2org/wultiplexor/issues",
        "Repository": "https://github.com/vd2org/wultiplexor.git"
    },
    "split_keywords": [
        "proxy",
        "gate",
        "gateway",
        "websocket",
        "network",
        "networking",
        "websockets",
        "tcp",
        "socks",
        "forward",
        "forwarding",
        "tunnel",
        "tunneling",
        "tunnelling",
        "multiplex",
        "multiplexing",
        "multiplexer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c6aad6bef390679d3c8271842a4a1b5a2d788bb6873ade5560e8177d6a2aece",
                "md5": "e60594bca475aab96742dd1883557ae9",
                "sha256": "99b403defbb6917f41f4e87aa6988b9bde52d4aa2254c76d23c2b2de6186a7f0"
            },
            "downloads": -1,
            "filename": "wultiplexor-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e60594bca475aab96742dd1883557ae9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.8",
            "size": 12305,
            "upload_time": "2024-02-26T11:48:57",
            "upload_time_iso_8601": "2024-02-26T11:48:57.460584Z",
            "url": "https://files.pythonhosted.org/packages/9c/6a/ad6bef390679d3c8271842a4a1b5a2d788bb6873ade5560e8177d6a2aece/wultiplexor-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f62fffe581cc7df6b66557b117ee5cec9d48290e98a4c5d4dc2ed441f1f7bd5a",
                "md5": "4422ad4aa4ced2de818a7411cc989f52",
                "sha256": "ab20dc13866555fa98d6874c29bf6b19587bc5f4a3c1ce14293985a88877700f"
            },
            "downloads": -1,
            "filename": "wultiplexor-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4422ad4aa4ced2de818a7411cc989f52",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.8",
            "size": 11801,
            "upload_time": "2024-02-26T11:48:59",
            "upload_time_iso_8601": "2024-02-26T11:48:59.085742Z",
            "url": "https://files.pythonhosted.org/packages/f6/2f/ffe581cc7df6b66557b117ee5cec9d48290e98a4c5d4dc2ed441f1f7bd5a/wultiplexor-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 11:48:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vd2org",
    "github_project": "wultiplexor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wultiplexor"
}
        
Elapsed time: 0.21483s