# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: Frp Server
spec:
    description: A fast reverse proxy that allows you to expose a local server located behind a NAT or firewall to the Internet.
    icon: https://raw.githubusercontent.com/fatedier/frp/refs/heads/dev/web/frps/public/favicon.ico
    readme: |
        # Frp
        Frp is a fast reverse proxy that allows you to expose a local server located behind a NAT or firewall to the Internet. It currently supports TCP and UDP, as well as HTTP and HTTPS protocols, enabling requests to be forwarded to internal services via domain name.

        After completing the deployment, please configure `frps.toml` via Config Edit according to the documentation at `https://github.com/fatedier/frp?tab=readme-ov-file#example-usage`. Also, configure the port in the Zeabur network tab.

        Once configuration is complete, download the corresponding platform version of the compressed package from `https://github.com/fatedier/frp/releases`, extract it, and configure `frpc.toml` to link with the Frp Server.

        ## Basic Example
        ### Frp Server (frps)
        ```
        bindPort = 7000
        auth.method = "token"
        auth.token = "your custom token"
        webServer.addr = "0.0.0.0"
        webServer.port = 7500
        webServer.user = "admin"
        webServer.password = "123456"
        ```
        ### Frp Client (frpc)
        ```
        serverAddr = "your server ip or domain"
        serverPort = your server bindport
        auth.method = "token"
        auth.token = "your server token"
        webServer.addr = "0.0.0.0"
        webServer.port = 7400
        webServer.user = "admin"
        webServer.password = "123456"

        [[proxies]]
        name = "25565"
        type = "tcp"
        localIP = "0.0.0.0"
        localPort = 25565
        remotePort = 25565

        [[proxies]]
        name = "3389"
        type = "tcp"
        localIP = "0.0.0.0"
        localPort = 3389
        remotePort = 3389
        ```
    services:
        - name: Frps
          icon: https://raw.githubusercontent.com/fatedier/frp/refs/heads/dev/web/frps/public/favicon.ico
          template: PREBUILT_V2
          spec:
            id: frps
            source:
                image: ghcr.io/fatedier/frps:v0.65.0
                command:
                    - /usr/bin/frps
                args:
                    - -c
                    - /opt/frps.toml
            ports:
                - id: bindport
                  port: 7000
                  type: TCP
                - id: web
                  port: 7500
                  type: HTTP
            configs:
                - path: /opt/frps.toml
                  template: |
                    bindPort = 7000
                    auth.method = "token"
                    auth.token = "YourCustomToken"
                    webServer.addr = "0.0.0.0"
                    webServer.port = 7500
                    webServer.user = "admin"
                    webServer.password = "123456"
                  permission: null
                  envsubst: null
localization:
    zh-CN:
        description: Frp 是一个快速的反向代理，允许您将位于 NAT 或防火墙后面的本地服务器暴露到互联网上。
        readme: |
            # Frp
            Frp 是一个快速的反向代理，允许您将位于 NAT 或防火墙后面的本地服务器暴露到互联网上。它当前支持 TCP 和 UDP，以及 HTTP 和 HTTPS 协议，使得请求可以通过域名转发到内部服务。

            在部署完成后，请根据文档 `https://github.com/fatedier/frp?tab=readme-ov-file#example-usage` 通过 Config Edit 对 `frps.toml` 进行配置。并在zeabur网络选项卡中配置端口。

            配置完成后从 `https://github.com/fatedier/frp/releases` 下载对应平台版本的压缩包解压后配置 `frpc.toml` 与 Frp Server 进行链接。

            ## 基础示例
            ### Frp Server (frps)
            ```
            bindPort = 7000
            auth.method = "token"
            auth.token = "your custom token"
            webServer.addr = "0.0.0.0"
            webServer.port = 7500
            webServer.user = "admin"
            webServer.password = "123456"
            ```
            ### Frp Client (frpc)
            ```
            serverAddr = "your server ip or domain"
            serverPort = your server bindport
            auth.method = "token"
            auth.token = "your server token"
            webServer.addr = "0.0.0.0"
            webServer.port = 7400
            webServer.user = "admin"
            webServer.password = "123456"

            [[proxies]]
            name = "25565"
            type = "tcp"
            localIP = "0.0.0.0"
            localPort = 25565
            remotePort = 25565

            [[proxies]]
            name = "3389"
            type = "tcp"
            localIP = "0.0.0.0"
            localPort = 3389
            remotePort = 3389
            ```
    zh-TW:
        description: Frp 是一個快速的反向代理，允許您將位於 NAT 或防火牆後面的本地伺服器暴露到互聯網上。
        readme: |-
            # Frp
            Frp 是一個快速的反向代理，允許您將位於 NAT 或防火牆後面的本地伺服器暴露到互聯網上。它目前支援 TCP 和 UDP，以及 HTTP 和 HTTPS 協議，使得請求可以透過域名轉發到內部服務。

            在部署完成後，請根據文檔 `https://github.com/fatedier/frp?tab=readme-ov-file#example-usage` 通過 Config Edit 對 `frps.toml` 進行配置。並在 zeabur 網路選項卡中配置端口。

            配置完成後從 `https://github.com/fatedier/frp/releases` 下載對應平台版本的壓縮檔解壓後配置 `frpc.toml` 與 Frp Server 進行連接。

            ## 基礎範例
            ### Frp Server (frps)
            ```
            bindPort = 7000
            auth.method = "token"
            auth.token = "your custom token"
            webServer.addr = "0.0.0.0"
            webServer.port = 7500
            webServer.user = "admin"
            webServer.password = "123456"
            ```
            ### Frp Client (frpc)
            ```
            serverAddr = "your server ip or domain"
            serverPort = your server bindport
            auth.method = "token"
            auth.token = "your server token"
            webServer.addr = "0.0.0.0"
            webServer.port = 7400
            webServer.user = "admin"
            webServer.password = "123456"

            [[proxies]]
            name = "25565"
            type = "tcp"
            localIP = "0.0.0.0"
            localPort = 25565
            remotePort = 25565

            [[proxies]]
            name = "3389"
            type = "tcp"
            localIP = "0.0.0.0"
            localPort = 3389
            remotePort = 3389
            ```
