{"meta":{"slug":"rathole","name":"Rathole","category":"rathole","source":"pterodactyl","owner":"pterodactyl","repo":"application-eggs","branch":"main","path":"rathole/egg-rathole.json","rawUrl":"https://raw.githubusercontent.com/pterodactyl/application-eggs/main/rathole/egg-rathole.json","indexedAt":1792246788483},"egg":{"_comment":"DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL","meta":{"update_url":null,"version":"PTDL_v2"},"exported_at":"2024-06-02T14:40:53+00:00","name":"Rathole","author":"tunayada@gmail.com","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/ptero-eggs/yolks:rust_latest":"ghcr.io/ptero-eggs/yolks:rust_latest"},"file_denylist":[],"startup":"./rathole server.toml","config":{"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}","logs":"{}","startup":"{\r\n    \"done\": [\r\n        \"Listening at \"\r\n    ]\r\n}","stop":"^C"},"scripts":{"installation":{"container":"ghcr.io/ptero-eggs/installers:debian","entrypoint":"bash","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 \"-----------------------------------------\""}},"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"}]},"readme":"# Rathole\nA secure, stable and high-performance reverse proxy for NAT traversal, written in Rust\n\nrathole, 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.\n\n## This egg only includes server side of rathole\nPlease refer to https://github.com/rapiz1/rathole for more information about rathole\n"}