Rathole v1.0.2

飒爽师叔 · 2026-06-30 09:00

更新日志

[AI翻译] 名称、描述、说明、JSON描述、变量

版本内容

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v2",
        "update_url": "https://eggs.pterodactyl.top/eggs/14/download/egg-rathole.json"
    },
    "exported_at": "2026-01-03T15:04:48+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": {
        "Rust_latest": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:rust_latest"
    },
    "file_denylist": [],
    "startup": "./rathole server.toml",
    "config": {
        "files": "{\n    \"server.toml\": {\n        \"parser\": \"file\",\n        \"find\": {\n            \"token = \\\"(.*)\\\"\": \"token = \\\"{{server.build.env.TOKEN}}\\\"\",\n            \"bind_addr = \\\"0.0.0.0:(.*)\\\"\": \"bind_addr = \\\"0.0.0.0:{{server.build.default.port}}\\\"\"\n        }\n    }\n}",
        "startup": "{\n    \"done\": [\n        \"Listening at \"\n    ]\n}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": "#!/bin/bash\r\n\r\n## get release info and download links\r\ncd /mnt/server\r\n\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/rathole-org/rathole/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/rathole-org/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 -r \".assets[].browser_download_url\" | grep -i \"${MATCH}\")\r\n    fi\r\nfi\r\n\r\necho \"Download url: ${DOWNLOAD_URL}\"\r\ncurl -ssL -o rathole.zip ${DOWNLOAD_URL}\r\nunzip -o rathole.zip\r\nrm rathole.zip\r\n\r\ncat <<EOF > server.toml\r\n[server]\r\nbind_addr = \"0.0.0.0:${SERVER_PORT}\"\r\n\r\n[server.services.my_nas_ssh]\r\ntoken = \"${TOKEN}\"\r\nbind_addr = \"0.0.0.0:${SERVER_PORT}\"\r\nEOF\r\n\r\nchmod +x rathole\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
            "container": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian",
            "entrypoint": "bash"
        }
    },
    "variables": [
        {
            "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"
        },
        {
            "name": "Version",
            "description": "",
            "env_variable": "VERSION",
            "default_value": "latest",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string|max:20",
            "field_type": "text"
        }
    ]
}