From 1fd11dee708030f2fe05d2350d6f58efa666e193 Mon Sep 17 00:00:00 2001 From: TunayAdaKaracan <61917035+TunayAdaKaracan@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:47:10 +0300 Subject: [PATCH 1/3] Add files via upload --- software/rathole/README.md | 0 software/rathole/egg-rathole.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 software/rathole/README.md create mode 100644 software/rathole/egg-rathole.json diff --git a/software/rathole/README.md b/software/rathole/README.md new file mode 100644 index 00000000..e69de29b diff --git a/software/rathole/egg-rathole.json b/software/rathole/egg-rathole.json new file mode 100644 index 00000000..fa6292c7 --- /dev/null +++ b/software/rathole/egg-rathole.json @@ -0,0 +1,31 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2023-12-15T15:44:13+03:00", + "name": "Rathole", + "author": "tunayada@gmail.com", + "description": "A rathole server egg designed to work with pterodactyl.", + "features": null, + "docker_images": { + "ghcr.io\/parkervcp\/yolks:rust_latest": "ghcr.io\/parkervcp\/yolks:rust_latest" + }, + "file_denylist": [], + "startup": ".\/rathole server.toml", + "config": { + "files": "{\r\n \"server.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"bind_addr=\\\"0.0.0.0:-1\\\"\": \"bind_addr=\\\"0.0.0.0:{{server.build.default.port}}\\\"\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": [\r\n \"Listening at \"\r\n ]\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y unzip wget\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nwget https:\/\/github.com\/rapiz1\/rathole\/releases\/download\/v0.5.0\/rathole-x86_64-unknown-linux-gnu.zip\r\n\r\nunzip rathole-x86_64-unknown-linux-gnu.zip\r\nrm rathole-x86_64-unknown-linux-gnu.zip\r\ntouch server.toml\r\nprintf \"[server]\\nbind_addr=\\\"0.0.0.0:-1\\\"\\n\\n[server.services.test]\\ntoken=\\\"a_hidden_token\\\"\\nbind_addr=\\\"0.0.0.0:3506\\\"\" > server.toml\r\n\r\nexport HOME=\/mnt\/server\r\n\r\necho -e \"install complete\"\r\nexit 0", + "container": "debian:buster-slim", + "entrypoint": "bash" + } + }, + "variables": [] +} \ No newline at end of file From 8e9cb0673ab86d9c0249a0dec5c1756d1794fe29 Mon Sep 17 00:00:00 2001 From: TunayAdaKaracan <61917035+TunayAdaKaracan@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:48:58 +0300 Subject: [PATCH 2/3] Update README.md --- software/rathole/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/software/rathole/README.md b/software/rathole/README.md index e69de29b..b6414292 100644 --- a/software/rathole/README.md +++ b/software/rathole/README.md @@ -0,0 +1,7 @@ +# Rathole +A secure, stable and high-performance reverse proxy for NAT traversal, written in Rust + +rathole, like frp and ngrok, can help to expose the service on the device behind the NAT to the Internet, via a server with a public IP. + +## This egg only includes server side of rathole +Please refer to https://github.com/rapiz1/rathole for more information about rathole From 99878e027931ba50991ffa88990f3b40a69f9f18 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 16 Dec 2023 14:04:15 +0100 Subject: [PATCH 3/3] Do it right --- software/rathole/egg-rathole.json | 33 +++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/software/rathole/egg-rathole.json b/software/rathole/egg-rathole.json index fa6292c7..d6930146 100644 --- a/software/rathole/egg-rathole.json +++ b/software/rathole/egg-rathole.json @@ -4,10 +4,10 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-12-15T15:44:13+03:00", + "exported_at": "2023-12-16T14:03:42+01:00", "name": "Rathole", "author": "tunayada@gmail.com", - "description": "A rathole server egg designed to work with pterodactyl.", + "description": "A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.", "features": null, "docker_images": { "ghcr.io\/parkervcp\/yolks:rust_latest": "ghcr.io\/parkervcp\/yolks:rust_latest" @@ -15,17 +15,38 @@ "file_denylist": [], "startup": ".\/rathole server.toml", "config": { - "files": "{\r\n \"server.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"bind_addr=\\\"0.0.0.0:-1\\\"\": \"bind_addr=\\\"0.0.0.0:{{server.build.default.port}}\\\"\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"server.toml\": {\r\n \"parser\": \"ini\",\r\n \"find\": {\r\n \"server.bind_addr\": \"\\\"0.0.0.0:{{server.build.default.port}}\\\"\",\r\n \"server.services.test.token\": \"\\\"{{server.build.env.TOKEN}}\\\"\",\r\n \"server.services.test.bind_addr\": \"\\\"0.0.0.0:{{server.build.default.port}}\\\"\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": [\r\n \"Listening at \"\r\n ]\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y unzip wget\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nwget https:\/\/github.com\/rapiz1\/rathole\/releases\/download\/v0.5.0\/rathole-x86_64-unknown-linux-gnu.zip\r\n\r\nunzip rathole-x86_64-unknown-linux-gnu.zip\r\nrm rathole-x86_64-unknown-linux-gnu.zip\r\ntouch server.toml\r\nprintf \"[server]\\nbind_addr=\\\"0.0.0.0:-1\\\"\\n\\n[server.services.test]\\ntoken=\\\"a_hidden_token\\\"\\nbind_addr=\\\"0.0.0.0:3506\\\"\" > server.toml\r\n\r\nexport HOME=\/mnt\/server\r\n\r\necho -e \"install complete\"\r\nexit 0", - "container": "debian:buster-slim", + "script": "#!\/bin\/bash\r\n\r\n## get release info and download links\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/rapiz1\/rathole\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/rapiz1\/rathole\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"aarch64\")\r\n\r\nif [\"${ARCH}\" == \"aarch64\"]; then\r\n MATCH=rathole-aarch64-unknown-linux-musl.zip\r\nelse\r\n MATCH=rathole-x86_64-unknown-linux-gnu.zip\r\nfi\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\necho \"Download url: ${DOWNLOAD_URL}\"\r\ncurl -ssL -o rathole.zip ${DOWNLOAD_URL}\r\nunzip rathole.zip\r\nrm rathole.zip\r\ntouch server.toml\r\n\r\nprintf \"[server]\\nbind_addr=\\\"0.0.0.0:${SERVER_PORT}\\\"\\n\\n[server.services.test]\\ntoken=\\\"${TOKEN}\\\"\\nbind_addr=\\\"0.0.0.0:${SERVER_PORT}\\\"\" > server.toml\r\nchmod +x rathole\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } }, - "variables": [] + "variables": [ + { + "name": "Version", + "description": "", + "env_variable": "VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20", + "field_type": "text" + }, + { + "name": "Secret", + "description": "Your random token", + "env_variable": "TOKEN", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|min:5|max:60", + "field_type": "text" + } + ] } \ No newline at end of file