52857d1d5563574707fb7926ef226be3a1e676e1
- internal/config: rewrite Config with PANGOLIN_ prefix fields (HTTPAddr, AdminAddr, GRPCAddr, MySQL DSN/fields, RedisAddr, AutoMigrate, JWTSecret placeholder, WebhookSecret); Load() replaces FromEnv(); missing required MySQL vars return named-field error. - internal/store/mysql.go: single Open(cfg) entry point; uses mysql.ParseDSN to structurally override ParseTime=true, Loc=UTC, Collation=utf8mb4_unicode_ci, Params[time_zone]='+00:00'; asserts SELECT @@session.time_zone=+00:00 after Ping (startup fatal). - migrations/embed.go: //go:embed *.sql exposes var FS embed.FS. - internal/store/migrate.go: MigrateUp/MigrateDown/MigrateVersion backed by golang-migrate iofs source + mysql driver; ErrNoChange treated as success. - cmd/migrate/main.go: filled — up/down/version subcommands, reads config.Load() + store.Open. - cmd/server/main.go: startup sequence Load → store.Open (UTC assert) → MigrateUp (if PANGOLIN_AUTO_MIGRATE=true) → HTTP listen; structured slog output at each step. - internal/store/mysql_test.go: pure-function unit tests for buildDSN (empty-fields case + conflicting params overridden case); both pass. - internal/store/mysql_integration_test.go: //go:build integration; testcontainers mysql:8 — UTC assertion + MigrateUp idempotency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pangolin
面向中国大陆用户的终端 VPN(科学上网)项目。
- 设计方案:
docs/技术方案.md - 实施计划:
plan/ - 部署(Phase 0,容器化 + CI/CD):
deploy/
Phase 0 现状
数据面两条线,容器化、经 Gitea Actions 自动部署到节点,与现网服务隔离:
- Xray VLESS + REALITY(主线,经宿主 nginx SNI 分流)
- sing-box Hysteria2(晚高峰加速线,UDP 443)
部署细节见 deploy/README.md。
Description
Releases
22
client 1.1.1
Latest
Languages
Go
36%
Dart
21.3%
JavaScript
13%
HTML
12.8%
Shell
4.4%
Other
12.3%