Skip to main content
This feature is only available in self-hosted Pangolin instances. If you’re using Pangolin Cloud, you will need to deploy a remote node.
Pangolin supports raw TCP and UDP traffic because Newt can pass anything through the tunnel. In Pangolin Community Edition, ensure you have the flag enabled in the config file:
flags:
  allow_raw_resources: true
You map the resource to a port on the host Pangolin server, so you can access the resource from <server-public-ip>:<mapped-port>. This is useful if you want to access the resource over the public internet, such as exposing a game server like Minecraft.

Proxied Resources

Proxied resources require extra configuration to expose on the Pangolin server. You’ll need to configure firewall rules, Docker port mappings, and Traefik entry points. These steps require a server restart.
1

Create the resource

In the Pangolin dashboard, go to Resources and click Add Resource. Select “Raw TCP/UDP resource”, and enter your desired publicly mapped port. This is the port you’ll use to access the proxied resource.
2

Configure firewall

Open your desired ports on your VPS firewall, just like you did for ports 51820, 443, and 80. This is highly OS and VPS dependent.
In this example, we’re exposing two resources: TCP 1602 and UDP 1704.
3

Configure Docker

Add port mappings to your docker-compose.yml file:
docker-compose.yml
gerbil:
  ports:
    # ... existing ports ...
    - 1704:1704/udp # ADDED: Your UDP port
    - 1602:1602 # ADDED: Your TCP port
4

Configure Traefik

Add entry points to your config/traefik/traefik_config.yml:
traefik_config.yml
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"
    http:
      tls:
        certResolver: letsencrypt
    transport:
      respondingTimeouts:
        readTimeout: 30m
  tcp-1602:
    address: ":1602/tcp"
  udp-1704:
    address: ":1704/udp"
Important: Always name your entry points in the format protocol-port (e.g., tcp-1602, udp-1704). This naming is required for Pangolin’s dynamic configuration.
5

Restart the stack

Restart your Docker stack to apply all changes:
sudo docker compose down
sudo docker compose up -d
In this example, we expose port 1602 for TCP and port 1704 for UDP. You can use any available ports on your VPS.

Proxy Protocol

On TCP resources you can enable Proxy Protocol support to forward the original client IP address to your backend service. This is useful for logging and access control. In order to enable proxy protocol, simply check the “Enable Proxy Protocol” box when creating or editing a TCP resource.
Your backend application must be configured to accept Proxy Protocol connections. If your backend doesn’t support Proxy Protocol, enabling this will break all connections so only enable this if you know what you’re doing. Make sure to configure your backend to trust Proxy Protocol headers from Traefik.
To enable Proxy Protocol in Traefik, add the following to the bottom of your config/traefik/dynamic_config.yml:
tcp:
  serversTransports:
    pp-transport-v1:
      proxyProtocol:
        version: 1
    pp-transport-v2:
      proxyProtocol:
        version: 2