From edbcbe41bbd2deb2ed0f75ca9532099471e54651 Mon Sep 17 00:00:00 2001 From: openoms Date: Fri, 12 Jun 2020 19:35:17 +0100 Subject: [PATCH] tor2ip: add GRPC and REST sample --- tor2ip.grpc.md | 29 +++++++++++++++++++++++++++++ tor2ip.rest.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tor2ip.grpc.md create mode 100644 tor2ip.rest.md diff --git a/tor2ip.grpc.md b/tor2ip.grpc.md new file mode 100644 index 0000000..a11b909 --- /dev/null +++ b/tor2ip.grpc.md @@ -0,0 +1,29 @@ +* create the service file: +`# nano /etc/systemd/system/tor2ip10175.service` + * Paste the following and fill in: + * the VPS_PORT you want to use (facing the public) - in this example: 10175. + * the TOR_HIDDEN_SERVICE_ADDRESS.onion + * get the address with: + * `sudo cat /mnt/hdd/tor/SERVICE_NAME/hostname` + * The TOR_PORT the Hidden Service is using - in this example: 8080 + + ``` + [Unit] + Description=Tor2IP Tunnel Service + After=network.target + + [Service] + User=root + Group=root + ExecStart=/usr/bin/socat TCP4-LISTEN:10175,bind=0.0.0.0,fork SOCKS4A:localhost:TOR_HIDDEN_SERVICE_ADDRESS.onion:10009,socksport=9050 + StandardOutput=journal + + [Install] + WantedBy=multi-user.target + ``` +* Enable and start the service: +`# systemctl enable tor2ip10175` +`# systemctl start tor2ip10175` + +Setting up this Tor-to-IP tunnel service is now complete. You can carry on adding other services using different ports on the VPS. +You should be able access the ports/services of the host computer through: VPS_IP_ADDRESS:VPS_PORT. diff --git a/tor2ip.rest.md b/tor2ip.rest.md new file mode 100644 index 0000000..e1aa2ac --- /dev/null +++ b/tor2ip.rest.md @@ -0,0 +1,29 @@ +* create the service file: +`# nano /etc/systemd/system/tor2ip8175.service` + * Paste the following and fill in: + * the VPS_PORT you want to use (facing the public) - in this example: 8175. + * the TOR_HIDDEN_SERVICE_ADDRESS.onion + * get the address with: + * `sudo cat /mnt/hdd/tor/SERVICE_NAME/hostname` + * The TOR_PORT the Hidden Service is using - in this example: 8080 + + ``` + [Unit] + Description=Tor2IP Tunnel Service + After=network.target + + [Service] + User=root + Group=root + ExecStart=/usr/bin/socat TCP4-LISTEN:8175,bind=0.0.0.0,fork SOCKS4A:localhost:TOR_HIDDEN_SERVICE_ADDRESS.onion:8080,socksport=9050 + StandardOutput=journal + + [Install] + WantedBy=multi-user.target + ``` +* Enable and start the service: +`# systemctl enable tor2ip8175` +`# systemctl start tor2ip8175` + +Setting up this Tor-to-IP tunnel service is now complete. You can carry on adding other services using different ports on the VPS. +You should be able access the ports/services of the host computer through: VPS_IP_ADDRESS:VPS_PORT.