http bridge for tonconnect 2.0
note: for common issues and troubleshooting, see KNOWN_ISSUES.md
- golang 1.18
- postgres
- git clone https://github.com/ton-connect/bridge
- cd bridge
- go build ./
- go run bridge
- LOG_LEVEL ##example"info"
- PORT ##example"8081"
- POSTGRES_URI ##example"postgres://user:pass@host/dbname"
- WEBHOOK_URL ##example"https://your-webhook-url.com"
- COPY_TO_URL ##example"https://your-copy-url.com"
- CORS_ENABLE ##example"true"
- HEARTBEAT_INTERVAL (in seconds) ##example"10"
- RPS_LIMIT ##example"1"
- RATE_LIMITS_BY_PASS_TOKEN ##example"token1,token2"
- CONNECTIONS_LIMIT ##example"50"
- DISCONNECT_EVENTS_TTL (in seconds) ##example"3600"
- DISCONNECT_EVENT_MAX_SIZE (in bytes) ##example"512"
- CONNECT_CACHE_SIZE ##example"2000000" (maximum number of entries in connect client cache)
- CONNECT_CACHE_TTL ##example"300" (time-to-live for connect client cache entries in seconds)
- SELF_SIGNED_TLS ##example"false"
- TRUSTED_PROXY_RANGES ##example"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" (comma-separated list of IP ranges to trust for X-Forwarded-For header)