From c47d74f353d7eba25f724b8d85a5332384a0181d Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 1 Nov 2019 13:05:53 -0700 Subject: [PATCH] make -m ntunnel work, and use that now that we've made ntunnel into a proper package.. --- README.md | 8 ++++---- ntunnel/__main__.py | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 ntunnel/__main__.py diff --git a/README.md b/README.md index 0109b0b..349fec7 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ Example Generate the keys: ``` -python ntunnel.py genkey serverkey -python ntunnel.py genkey clientkey +python -m ntunnel genkey serverkey +python -m ntunnel genkey clientkey ``` Create the target for the pass through: @@ -23,8 +23,8 @@ nc -lU finalsock Start the server and client: ``` -python ntunnel.py server serverkey unix:$(pwd)/servsock unix:$(pwd)/finalsock -python ntunnel.py client clientkey serverkey.pub unix:$(pwd)/clientsock unix:$(pwd)/servsock +python -m ntunnel server serverkey unix:$(pwd)/servsock unix:$(pwd)/finalsock +python -m ntunnel client clientkey serverkey.pub unix:$(pwd)/clientsock unix:$(pwd)/servsock ``` Attach to the client: diff --git a/ntunnel/__main__.py b/ntunnel/__main__.py new file mode 100644 index 0000000..6eaa5aa --- /dev/null +++ b/ntunnel/__main__.py @@ -0,0 +1,4 @@ +from . import main + +if __name__ == '__main__': + main()