{"id":31552326,"url":"https://github.com/unchainese/unchain","last_synced_at":"2025-10-04T19:52:23.685Z","repository":{"id":266001648,"uuid":"897081363","full_name":"unchainese/unchain","owner":"unchainese","description":"Unchain is a lightweight and easy-to-use proxy server designed to bypass network restrictions.","archived":false,"fork":false,"pushed_at":"2025-09-01T09:53:28.000Z","size":9170,"stargazers_count":82,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-01T11:51:47.793Z","etag":null,"topics":["clash","shadowrocket","singbox","v2ray","vless","xray"],"latest_commit_sha":null,"homepage":"https://zh.mojotv.cn/misc/unchain-aws-ec2-deploy.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unchainese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-02T01:42:39.000Z","updated_at":"2025-09-01T09:53:31.000Z","dependencies_parsed_at":"2025-01-15T09:54:09.325Z","dependency_job_id":"b4488193-651b-4a63-a9a5-ef465502f476","html_url":"https://github.com/unchainese/unchain","commit_stats":null,"previous_names":["unchainese/emissary","unchainese/unchain"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/unchainese/unchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unchainese%2Funchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unchainese%2Funchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unchainese%2Funchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unchainese%2Funchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unchainese","download_url":"https://codeload.github.com/unchainese/unchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unchainese%2Funchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366615,"owners_count":25975090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clash","shadowrocket","singbox","v2ray","vless","xray"],"created_at":"2025-10-04T19:52:19.555Z","updated_at":"2025-10-04T19:52:23.677Z","avatar_url":"https://github.com/unchainese.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unchain\n\nA lightweight, high-performance proxy server for bypassing network restrictions using VLESS over WebSocket with TLS.\n\n[![Go Version](https://img.shields.io/badge/Go-1.23+-blue.svg)](https://golang.org/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](LICENSE)\n[![Docker](https://img.shields.io/badge/Docker-Supported-blue.svg)](Dockerfile)\n\n## Features\n\n- **VLESS Protocol Support**: Full VLESS over WebSocket with TLS encryption\n- **Client Compatible**: Works with v2rayN, v2rayA, Clash, ShadowRocket, and more\n- **Lightweight**: Minimal resource footprint with core logic in ~200 lines\n- **Production Ready**: Includes traffic metering, health checks, and graceful shutdown\n- **Flexible Deployment**: Standalone or integrated with admin servers\n- **Memory Efficient**: Optimized goroutine management and resource cleanup\n- **High Performance**: Concurrent connections optimized for Go 1.23\n\n## Quick Start\n\n### Prerequisites\n- Go 1.23+ or Docker\n- Basic proxy/VPN knowledge\n\n### Install from Source\n\n```bash\ngit clone https://github.com/unchainese/unchain.git\ncd unchain\ngo mod download\ncp config.example.standalone.toml config.toml\n# Edit config.toml\ngo run main.go\n```\n\n### Docker\n\n```bash\ndocker build -t unchain .\ndocker run -p 80:80 \\\n  -e SUB_ADDRESSES=\"your-domain.com:443\" \\\n  -e ALLOW_USERS=\"your-uuid\" \\\n  unchain\n```\n\n## Configuration\n\nUnchain uses TOML config or environment variables.\n\n### config.toml\n\n```toml\nSubAddresses = 'domain.com:443'\nAppPort = '80'\nAllowUsers = 'uuid1,uuid2'\nLogFile = ''\nDebugLevel = 'info'\nEnableDataUsageMetering = 'true'\n```\n\n### Environment Variables\n\n```bash\nAPP_PORT=80\nSUB_ADDRESSES=domain.com:443\nALLOW_USERS=uuid1,uuid2\n```\n\n## Usage\n\n### Endpoints\n- `/wsv/{uid}` - VLESS WebSocket endpoint\n- `/sub/{uid}` - Subscription URL generator\n- `/` - Health check\n\n### Get VLESS URLs\n```bash\ncurl http://localhost:80/sub/your-uuid\n```\n\n### Client Setup\nImport the generated VLESS URL into your client (v2rayN, Clash, etc.).\n\n## Architecture\n\n```\nClient --VLESS/WS/TLS--\u003e Reverse Proxy --WS--\u003e Unchain --TCP/UDP--\u003e Target\n```\n\nUnchain runs behind a reverse proxy (Nginx/Cloudflare) handling TLS and WebSocket upgrades.\n\n## Project Structure\n\n```\n├── main.go                 # Entry point\n├── server/                 # Core server\n│   ├── app.go             # HTTP server\n│   ├── app_ws_vless.go    # VLESS handler\n│   ├── app_ping.go        # Health check\n│   └── app_sub.go         # Subscription\n├── global/                 # Utilities\n│   ├── config.go          # Config management\n│   └── logger.go          # Logging\n├── schema/                 # Protocols\n│   ├── vless.go           # VLESS parser\n│   └── trojan.go          # Trojan support\n├── client/                 # Client utilities\n│   ├── client.go          # SOCKS5 proxy\n│   ├── websocket.go       # WS client\n│   ├── proxy.go           # Coordination\n│   ├── relay_*.go         # Relays\n│   ├── socks5_*.go        # SOCKS5\n│   └── geo.go             # GeoIP\n├── config.example.standalone.toml\n└── Dockerfile\n```\n\n## Technology Stack\n\n- **Go 1.23**\n- **gorilla/websocket** v1.5.3\n- **BurntSushi/toml** v1.4.0\n- **google/uuid** v1.6.0\n- **oschwald/geoip2-golang** v1.11.0\n- **sirupsen/logrus** v1.9.3\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Connection Failed**\n   - Check server status: `curl http://localhost:80/`\n   - Verify firewall and DNS\n   - Ensure reverse proxy is configured\n\n2. **WebSocket Errors**\n   - Confirm proxy supports WS upgrades\n   - Check TLS certificates\n\n3. **Auth Failed**\n   - Verify UUID in `AllowUsers`\n   - Check admin server if used\n\n4. **High Memory**\n   - Monitor goroutines via `/`\n   - Restart if \u003e1000 goroutines\n\n### Debug\nSet `DebugLevel = 'debug'` and check logs.\n\n## Client Compatibility\n\n- v2rayN (Windows)\n- v2rayA (Cross-platform)\n- Clash (Cross-platform)\n- v2rayNG (Android)\n- ShadowRocket (iOS)\n\n## Business Use\n\nIntegrate with admin server for user management, traffic metering, and billing.\n\nSee [UnchainAdmin](https://github.com/unchainese/unchainadmin) for example.\n\n## Performance\n\n- **RAM**: 512MB min, 1GB+ recommended\n- **CPU**: 1 core min, 2+ for production\n- **Connections**: Thousands concurrent\n- **Memory**: ~20MB base + ~1-2MB/100 connections\n\n## Contributing\n\n1. Fork the repo\n2. Create feature branch\n3. Commit changes\n4. Push and open PR\n\n### Development\n\n```bash\ngit clone https://github.com/yourusername/unchain.git\ncd unchain\ngo mod download\ngo test ./...\ngo build\n```\n\n## License\n\nApache License 2.0 - see [LICENSE](LICENSE)\n\n---\n\n⭐ Star if useful! [Issues](https://github.com/unchainese/unchain/issues) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funchainese%2Funchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funchainese%2Funchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funchainese%2Funchain/lists"}