lferrarotti74/zerotier-proxy

By lferrarotti74

Updated 16 days ago

Lightweight ZeroTier TCP Proxy container for secure network bridging. MIT licensed.

Image
Networking
0

7.5K

lferrarotti74/zerotier-proxy repository overview

ZeroTier TCP Proxy

A lightweight Docker container that provides ZeroTier TCP proxy functionality for secure network bridging and connection forwarding across ZeroTier networks.

🚀 Quick Start

version: '3.8'

services:
  zerotier-proxy:
    image: lferrarotti74/zerotier-proxy:latest
    hostname: zerotier-proxy
    container_name: zerotier-proxy
    restart: unless-stopped
    volumes:
      - zerotier-proxy:/var/lib/zerotier-one
    networks:
      - zerotier-proxy
    ports:
      - "8443:8443/tcp"
    environment:
      - ZT_OVERRIDE_LOCAL_CONF=true
      - ZT_TCP_PORT=8443
      # Cloud Provider features (Future functionality - not yet available)
      # - ZT_CLOUD_PROVIDER=linode
      # - ZT_CLOUD_API_TOKEN=a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456
      # - ZT_CLOUD_FIREWALL_ID=9876543

volumes:
  zerotier-proxy:

networks:
  zerotier-proxy:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.31.251.8/29
Docker Run
docker run -d \
  --name zerotier-proxy \
  --restart unless-stopped \
  -p 8443:8443/tcp \
  -v zerotier-proxy:/var/lib/zerotier-one \
  -e ZT_TCP_PORT=8443 \
  -e ZT_OVERRIDE_LOCAL_CONF=true \
  lferrarotti74/zerotier-proxy:latest

⚙️ Configuration

Environment Variables
VariableDescriptionDefaultRequired
ZT_TCP_PORTTCP port for proxy connections443No
ZT_OVERRIDE_LOCAL_CONFOverride local.conf with environment variablesfalseNo
ZT_CLOUD_PROVIDERCloud provider integration (Future feature)-No
ZT_CLOUD_API_TOKENCloud provider API token (Future feature)-No
ZT_CLOUD_FIREWALL_IDCloud firewall ID (Future feature)-No
Configuration File

The proxy reads configuration from /var/lib/zerotier-one/local.conf. If this file exists, it takes precedence over environment variables unless ZT_OVERRIDE_LOCAL_CONF=true.

Example local.conf:

{
  "settings": {
    "tcpPort": 8443
  }
}
Port Configuration Priority
  1. local.conf file (if present and ZT_OVERRIDE_LOCAL_CONF=false)
  2. ZT_TCP_PORT environment variable (if ZT_OVERRIDE_LOCAL_CONF=true)
  3. Default port 443 (fallback)

🏗️ Architecture Support

  • amd64 (x86_64)

🔧 Advanced Configuration

Custom Network Bridge
networks:
  zerotier-proxy:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.31.251.8/29
Port Mapping
ports:
  - "8443:8443/tcp"

🌟 Features

  • Lightweight: Minimal resource footprint
  • Architecture: Supports AMD64
  • Configurable: Flexible port and network configuration
  • Persistent: Volume-based configuration storage
  • Secure: Non-root execution with security best practices
  • Logging: Timestamped connection logging
  • Health Checks: Built-in container health monitoring

🔮 Future Features

Note: The following cloud provider integration features are planned for future releases and are not yet available in the current version:

  • Cloud Provider Integration: Automatic firewall rule management
  • Supported Providers: Linode, AWS, DigitalOcean, and more
  • Dynamic Firewall Rules: Automatic security group updates
  • API-driven Configuration: Cloud-native deployment automation

📊 Monitoring

Check container logs for connection activity:

docker logs zerotier-proxy

Example log output:

[Thu Nov  7 12:41:08 2024] - Config file present.
[Thu Nov  7 12:41:08 2024] - Server listening on TCP port : 8443
[Thu Nov  7 12:41:15 2024] << TCP from 192.168.1.100 -> 0x7f8b4c000000

🔒 Security

  • Runs as non-root user
  • Multi-stage Docker build
  • Regular security updates
  • Input validation and sanitization
  • Resource isolation and limits
  • Secure TCP connection handling

📚 Documentation

🏷️ Tags

  • latest - Latest stable release
  • v1.14.2 - Specific version releases

📄 License

MIT License - see LICENSE file for details.

🆘 Support


Note: This container provides TCP proxy functionality for ZeroTier networks. Ensure proper network configuration and security policies are in place before deployment in production environments.

Tag summary

Content type

Image

Digest

sha256:cefa3f136

Size

9.1 MB

Last updated

16 days ago

docker pull lferrarotti74/zerotier-proxy:1.14.2