mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 06:13:33 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05cbf99237 | ||
|
|
d5c0e62be1 | ||
|
|
a21bdedbc1 | ||
|
|
797ebd7771 | ||
|
|
04e9ecbc76 | ||
|
|
9626b65593 | ||
|
|
c9b5516330 | ||
|
|
4363ca88aa | ||
|
|
3353060ad4 | ||
|
|
ddc3b8575e |
@@ -13,6 +13,8 @@ For full documentation, check out **[Wiki](https://github.com/yusing/go-proxy/wi
|
||||
|
||||
**EN** | <a href="README_CHT.md">中文</a>
|
||||
|
||||
**Currently working on [feat/godoxy-agent](https://github.com/yusing/go-proxy/tree/feat/godoxy-agent).<br/>Fork this instead of default branch.**
|
||||
|
||||
<!-- [](https://sonarcloud.io/summary/new_code?id=yusing_go-proxy)
|
||||
[](https://sonarcloud.io/summary/new_code?id=yusing_go-proxy)
|
||||
[](https://sonarcloud.io/summary/new_code?id=yusing_go-proxy) -->
|
||||
@@ -66,6 +68,8 @@ Setup DNS Records point to machine which runs `GoDoxy`, e.g.
|
||||
|
||||
## Setup
|
||||
|
||||
**NOTE:** GoDoxy is designed to be (and only works when) running in `host` network mode, do not change it. To change listening ports, modify `.env`.
|
||||
|
||||
1. Pull the latest docker images
|
||||
|
||||
```shell
|
||||
|
||||
55
go.mod
55
go.mod
@@ -3,28 +3,28 @@ module github.com/yusing/go-proxy
|
||||
go 1.23.5
|
||||
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.10.1
|
||||
github.com/coder/websocket v1.8.12
|
||||
github.com/coreos/go-oidc/v3 v3.12.0
|
||||
github.com/docker/cli v27.5.1+incompatible
|
||||
github.com/docker/docker v27.5.1+incompatible
|
||||
github.com/fsnotify/fsnotify v1.8.0
|
||||
github.com/go-acme/lego/v4 v4.21.0
|
||||
github.com/go-playground/validator/v10 v10.24.0
|
||||
github.com/gobwas/glob v0.2.3
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1
|
||||
github.com/gotify/server/v2 v2.6.1
|
||||
github.com/lithammer/fuzzysearch v1.1.8
|
||||
github.com/prometheus/client_golang v1.20.5
|
||||
github.com/puzpuzpuz/xsync/v3 v3.5.0
|
||||
github.com/rs/zerolog v1.33.0
|
||||
github.com/vincent-petithory/dataurl v1.0.0
|
||||
golang.org/x/crypto v0.32.0
|
||||
golang.org/x/net v0.34.0
|
||||
golang.org/x/oauth2 v0.25.0
|
||||
golang.org/x/text v0.21.0
|
||||
golang.org/x/time v0.9.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
github.com/PuerkitoBio/goquery v1.10.1 // parsing HTML for extract fav icon
|
||||
github.com/coder/websocket v1.8.12 // websocket for API and agent
|
||||
github.com/coreos/go-oidc/v3 v3.12.0 // oidc authentication
|
||||
github.com/docker/cli v27.5.1+incompatible // docker CLI
|
||||
github.com/docker/docker v27.5.1+incompatible // docker daemon
|
||||
github.com/fsnotify/fsnotify v1.8.0 // file watcher
|
||||
github.com/go-acme/lego/v4 v4.21.0 // acme client
|
||||
github.com/go-playground/validator/v10 v10.24.0 // validator
|
||||
github.com/gobwas/glob v0.2.3 // glob matcher for route rules
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // jwt for default auth
|
||||
github.com/gotify/server/v2 v2.6.1 // reference the Message struct for json response
|
||||
github.com/lithammer/fuzzysearch v1.1.8 // fuzzy search for searching icons and filtering metrics
|
||||
github.com/prometheus/client_golang v1.20.5 // metrics
|
||||
github.com/puzpuzpuz/xsync/v3 v3.5.0 // lock free map for concurrent operations
|
||||
github.com/rs/zerolog v1.33.0 // logging
|
||||
github.com/vincent-petithory/dataurl v1.0.0 // data url for fav icon
|
||||
golang.org/x/crypto v0.33.0 // encrypting password with bcrypt
|
||||
golang.org/x/net v0.35.0 // HTTP header utilities
|
||||
golang.org/x/oauth2 v0.26.0 // oauth2 authentication
|
||||
golang.org/x/text v0.22.0 // string utilities
|
||||
golang.org/x/time v0.10.0 // time utilities
|
||||
gopkg.in/yaml.v3 v3.0.1 // yaml parsing for different config files
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -57,9 +57,10 @@ require (
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/nrdcg/porkbun v0.4.0 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/ovh/go-ovh v1.6.0 // indirect
|
||||
github.com/ovh/go-ovh v1.7.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.62.0 // indirect
|
||||
@@ -72,11 +73,11 @@ require (
|
||||
go.opentelemetry.io/otel/metric v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.30.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.34.0 // indirect
|
||||
golang.org/x/mod v0.22.0 // indirect
|
||||
golang.org/x/sync v0.10.0 // indirect
|
||||
golang.org/x/sys v0.29.0 // indirect
|
||||
golang.org/x/mod v0.23.0 // indirect
|
||||
golang.org/x/sync v0.11.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/tools v0.29.0 // indirect
|
||||
google.golang.org/protobuf v1.36.4 // indirect
|
||||
google.golang.org/protobuf v1.36.5 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gotest.tools/v3 v3.5.1 // indirect
|
||||
)
|
||||
|
||||
40
go.sum
40
go.sum
@@ -113,12 +113,14 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/nrdcg/porkbun v0.4.0 h1:rWweKlwo1PToQ3H+tEO9gPRW0wzzgmI/Ob3n2Guticw=
|
||||
github.com/nrdcg/porkbun v0.4.0/go.mod h1:/QMskrHEIM0IhC/wY7iTCUgINsxdT2WcOphktJ9+Q54=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/ovh/go-ovh v1.6.0 h1:ixLOwxQdzYDx296sXcgS35TOPEahJkpjMGtzPadCjQI=
|
||||
github.com/ovh/go-ovh v1.6.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
|
||||
github.com/ovh/go-ovh v1.7.0 h1:V14nF7FwDjQrZt9g7jzcvAAQ3HN6DNShRFRMC3jLoPw=
|
||||
github.com/ovh/go-ovh v1.7.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@@ -176,8 +178,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
||||
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
||||
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
|
||||
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
@@ -185,8 +187,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
|
||||
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
|
||||
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -199,10 +201,10 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
||||
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
||||
golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
|
||||
golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
|
||||
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
|
||||
golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE=
|
||||
golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -211,8 +213,9 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
|
||||
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -229,8 +232,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -248,10 +251,11 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
|
||||
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||
golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
|
||||
golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
@@ -273,8 +277,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU=
|
||||
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
|
||||
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
|
||||
google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM=
|
||||
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
|
||||
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/go-acme/lego/v4/providers/dns/cloudflare"
|
||||
"github.com/go-acme/lego/v4/providers/dns/duckdns"
|
||||
"github.com/go-acme/lego/v4/providers/dns/ovh"
|
||||
"github.com/go-acme/lego/v4/providers/dns/porkbun"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -20,6 +21,7 @@ const (
|
||||
ProviderClouddns = "clouddns"
|
||||
ProviderDuckdns = "duckdns"
|
||||
ProviderOVH = "ovh"
|
||||
ProviderPorkbun = "porkbun"
|
||||
)
|
||||
|
||||
var providersGenMap = map[string]ProviderGenerator{
|
||||
@@ -28,4 +30,5 @@ var providersGenMap = map[string]ProviderGenerator{
|
||||
ProviderClouddns: providerGenerator(clouddns.NewDefaultConfig, clouddns.NewDNSProviderConfig),
|
||||
ProviderDuckdns: providerGenerator(duckdns.NewDefaultConfig, duckdns.NewDNSProviderConfig),
|
||||
ProviderOVH: providerGenerator(ovh.NewDefaultConfig, ovh.NewDNSProviderConfig),
|
||||
ProviderPorkbun: providerGenerator(porkbun.NewDefaultConfig, porkbun.NewDNSProviderConfig),
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ func StartNotifDispatcher(parent task.Parent) *Dispatcher {
|
||||
}
|
||||
|
||||
func Notify(msg *LogMessage) {
|
||||
if dispatcher == nil {
|
||||
return
|
||||
}
|
||||
select {
|
||||
case <-dispatcher.task.Context().Done():
|
||||
return
|
||||
|
||||
@@ -102,8 +102,11 @@ func (p *DockerProvider) routesFromContainerLabels(container *docker.Container)
|
||||
|
||||
// init entries map for all aliases
|
||||
for _, a := range container.Aliases {
|
||||
routes[a] = &route.Route{}
|
||||
routes[a].Metadata.Container = container
|
||||
routes[a] = &route.Route{
|
||||
Metadata: route.Metadata{
|
||||
Container: container,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
errs := E.NewBuilder("label errors")
|
||||
@@ -157,8 +160,11 @@ func (p *DockerProvider) routesFromContainerLabels(container *docker.Container)
|
||||
// init entry if not exist
|
||||
r, ok := routes[alias]
|
||||
if !ok {
|
||||
r = &route.Route{}
|
||||
r.Metadata.Container = container
|
||||
r = &route.Route{
|
||||
Metadata: route.Metadata{
|
||||
Container: container,
|
||||
},
|
||||
}
|
||||
routes[alias] = r
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ func makeRoutes(cont *types.Container, dockerHostIP ...string) route.Routes {
|
||||
} else {
|
||||
host = client.DefaultDockerHost
|
||||
}
|
||||
cont.ID = "test"
|
||||
p.name = "test"
|
||||
routes := Must(p.routesFromContainerLabels(D.FromDocker(cont, host)))
|
||||
for _, r := range routes {
|
||||
@@ -55,37 +56,35 @@ func TestApplyLabel(t *testing.T) {
|
||||
"GET /static",
|
||||
}
|
||||
middlewaresExpect := map[string]map[string]any{
|
||||
"middleware1": {
|
||||
"prop1": "value1",
|
||||
"prop2": "value2",
|
||||
},
|
||||
"middleware2": {
|
||||
"prop3": "value3",
|
||||
"prop4": "value4",
|
||||
"request": {
|
||||
"set_headers": map[string]any{
|
||||
"X-Header": "value1",
|
||||
},
|
||||
"add_headers": map[string]any{
|
||||
"X-Header2": "value2",
|
||||
},
|
||||
},
|
||||
}
|
||||
entries := makeRoutes(&types.Container{
|
||||
Names: dummyNames,
|
||||
Labels: map[string]string{
|
||||
D.LabelAliases: "a,b",
|
||||
D.LabelIdleTimeout: "",
|
||||
D.LabelStopMethod: common.StopMethodDefault,
|
||||
D.LabelStopSignal: "SIGTERM",
|
||||
D.LabelStopTimeout: common.StopTimeoutDefault,
|
||||
D.LabelWakeTimeout: common.WakeTimeoutDefault,
|
||||
"proxy.*.no_tls_verify": "true",
|
||||
"proxy.*.scheme": "https",
|
||||
"proxy.*.host": "app",
|
||||
"proxy.*.port": "4567",
|
||||
"proxy.a.path_patterns": pathPatterns,
|
||||
"proxy.a.middlewares.middleware1.prop1": "value1",
|
||||
"proxy.a.middlewares.middleware1.prop2": "value2",
|
||||
"proxy.a.middlewares.middleware2.prop3": "value3",
|
||||
"proxy.a.middlewares.middleware2.prop4": "value4",
|
||||
"proxy.a.homepage.show": "true",
|
||||
"proxy.a.homepage.icon": "png/adguard-home.png",
|
||||
"proxy.a.healthcheck.path": "/ping",
|
||||
"proxy.a.healthcheck.interval": "10s",
|
||||
D.LabelAliases: "a,b",
|
||||
D.LabelIdleTimeout: "",
|
||||
D.LabelStopMethod: common.StopMethodDefault,
|
||||
D.LabelStopSignal: "SIGTERM",
|
||||
D.LabelStopTimeout: common.StopTimeoutDefault,
|
||||
D.LabelWakeTimeout: common.WakeTimeoutDefault,
|
||||
"proxy.*.no_tls_verify": "true",
|
||||
"proxy.*.scheme": "https",
|
||||
"proxy.*.host": "app",
|
||||
"proxy.*.port": "4567",
|
||||
"proxy.a.path_patterns": pathPatterns,
|
||||
"proxy.a.middlewares.request.set_headers.X-Header": "value1",
|
||||
"proxy.a.middlewares.request.add_headers.X-Header2": "value2",
|
||||
"proxy.a.homepage.show": "true",
|
||||
"proxy.a.homepage.icon": "png/adguard-home.png",
|
||||
"proxy.a.healthcheck.path": "/ping",
|
||||
"proxy.a.healthcheck.interval": "10s",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -198,6 +197,7 @@ func TestApplyLabelWithRefIndexError(t *testing.T) {
|
||||
Labels: map[string]string{
|
||||
D.LabelAliases: "a,b",
|
||||
"proxy.#1.host": "localhost",
|
||||
"proxy.*.port": "4444",
|
||||
"proxy.#4.scheme": "https",
|
||||
},
|
||||
}, "")
|
||||
|
||||
@@ -77,6 +77,9 @@ func (r *Route) Validate() (err E.Error) {
|
||||
switch r.Scheme {
|
||||
case types.SchemeFileServer:
|
||||
r.impl, err = NewFileServer(r)
|
||||
if err != nil {
|
||||
errs.Add(err)
|
||||
}
|
||||
case types.SchemeHTTP, types.SchemeHTTPS:
|
||||
if r.Port.Listening != 0 {
|
||||
errs.Addf("unexpected listening port for %s scheme", r.Scheme)
|
||||
@@ -86,9 +89,6 @@ func (r *Route) Validate() (err E.Error) {
|
||||
r.LisURL = E.Collect(errs, net.ParseURL, fmt.Sprintf("%s://%s:%d", r.Scheme, r.Host, r.Port.Listening))
|
||||
fallthrough
|
||||
default:
|
||||
if r.Port.Proxy == 0 && !r.IsDocker() {
|
||||
errs.Adds("missing proxy port")
|
||||
}
|
||||
if r.LoadBalance != nil && r.LoadBalance.Link == "" {
|
||||
r.LoadBalance = nil
|
||||
}
|
||||
@@ -233,6 +233,9 @@ func (r *Route) UseAccessLog() bool {
|
||||
}
|
||||
|
||||
func (r *Route) Finalize() {
|
||||
r.Alias = strings.ToLower(strings.TrimSpace(r.Alias))
|
||||
r.Host = strings.ToLower(strings.TrimSpace(r.Host))
|
||||
|
||||
isDocker := r.Container != nil
|
||||
cont := r.Container
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ var (
|
||||
ErrInvalidCommandSequence = E.New("invalid command sequence")
|
||||
ErrInvalidSetTarget = E.New("invalid `rule.set` target")
|
||||
|
||||
ErrExpectNoArg = E.New("expect no arg")
|
||||
ErrExpectOneArg = E.New("expect 1 arg")
|
||||
ErrExpectTwoArgs = E.New("expect 2 args")
|
||||
ErrExpectKVOptionalV = E.New("expect 'key' or 'key value'")
|
||||
ErrExpectNoArg = E.Wrap(ErrInvalidArguments, "expect no arg")
|
||||
ErrExpectOneArg = E.Wrap(ErrInvalidArguments, "expect 1 arg")
|
||||
ErrExpectTwoArgs = E.Wrap(ErrInvalidArguments, "expect 2 args")
|
||||
ErrExpectKVOptionalV = E.Wrap(ErrInvalidArguments, "expect 'key' or 'key value'")
|
||||
)
|
||||
|
||||
@@ -1,6 +1,84 @@
|
||||
GoDoxy v0.9.1 expected changes
|
||||
## GoDoxy v0.10.0
|
||||
|
||||
- Support Ntfy notifications
|
||||
- Prometheus metrics server now inside API server under `/v1/metrics`
|
||||
- `GODOXY_PROMETHEUS_ADDR` removed
|
||||
- `GODOXY_PROMETHEUS_ENABLED` added, default `false`
|
||||
### GoDoxy Agent
|
||||
|
||||
Maintain secure connection between main server and agent server by authenticating and encrypting connection with mTLS.
|
||||
|
||||
Main benefits:
|
||||
|
||||
- No more exposing docker socket: drops the need of `docker-socket-proxy`
|
||||
- No more exposing app ports: fewer attack surface
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
...
|
||||
# ports: # this part is not needed on agent server
|
||||
# - 6789
|
||||
```
|
||||
- Secure: no one can connect to it except GoDoxy main server because of mTLS, plus connection is encrypted
|
||||
- Fetch info from agent server, e.g. CPU usage, Memory usage, container list, container logs, etc... (to be ready for beszel and dockge like features in WebUI)
|
||||
|
||||
#### How to setup
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- GoDoxy main server must be running
|
||||
|
||||
1. Create a directory for agent server, cd into it
|
||||
2. Copy `agent.compose.yml` into the directory
|
||||
3. Modify `agent.compose.yml` to set `REGISTRATION_ALLOWED_HOSTS`
|
||||
4. Run `docker-compose up -d` to start agent
|
||||
5. Follow instructions on screen to run command on GoDoxy main server
|
||||
6. Add config output to GoDoxy main server in `config.yml` under `providers.agents`
|
||||
```yaml
|
||||
providers:
|
||||
agents:
|
||||
- 12.34.5.6:8889
|
||||
```
|
||||
|
||||
### How does it work
|
||||
|
||||
Setup flow:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Agent Server
|
||||
A[Create a directory] -->
|
||||
B[Setup agent.compose.yml] -->
|
||||
C[Set REGISTRATION_ALLOWED_HOSTS] -->
|
||||
D[Run agent] -->
|
||||
E[Wait for main server to register]
|
||||
|
||||
F[Respond to main server]
|
||||
G[Agent now run in agent mode]
|
||||
end
|
||||
subgraph Main Server
|
||||
E -->
|
||||
H[Run register command] -->
|
||||
I[Send registration request] --> F -->
|
||||
J[Store client certs] -->
|
||||
K[Send done request] --> G -->
|
||||
L[Add agent to config.yml]
|
||||
end
|
||||
```
|
||||
|
||||
Run flow:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Agent HTTPS Server
|
||||
aa[Load CA and SSL certs] -->
|
||||
ab[Start HTTPS server] -->
|
||||
|
||||
ac[Receive request] -->
|
||||
ad[Verify client cert] -->
|
||||
ae[Handle request] --> ac
|
||||
end
|
||||
subgraph Main Server
|
||||
ma[Load client certs] -->
|
||||
mb[Query agent version] --> ac
|
||||
mb --> mc[Check if agent version matches] -->
|
||||
md[Query agent info] --> ac
|
||||
md --> ae --> me[Store agent info]
|
||||
end
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "godoxy-schemas",
|
||||
"version": "0.9.2-2",
|
||||
"version": "0.9.6",
|
||||
"description": "JSON Schema and typescript types for GoDoxy configuration",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
11
schemas/config/autocert.d.ts
vendored
11
schemas/config/autocert.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { DomainOrWildcard, Email } from "../types";
|
||||
export declare const AUTOCERT_PROVIDERS: readonly ["local", "cloudflare", "clouddns", "duckdns", "ovh"];
|
||||
export declare const AUTOCERT_PROVIDERS: readonly ["local", "cloudflare", "clouddns", "duckdns", "ovh", "porkbun"];
|
||||
export type AutocertProvider = (typeof AUTOCERT_PROVIDERS)[number];
|
||||
export type AutocertConfig = LocalOptions | CloudflareOptions | CloudDNSOptions | DuckDNSOptions | OVHOptionsWithAppKey | OVHOptionsWithOAuth2Config;
|
||||
export type AutocertConfig = LocalOptions | CloudflareOptions | CloudDNSOptions | DuckDNSOptions | OVHOptionsWithAppKey | OVHOptionsWithOAuth2Config | PorkbunOptions;
|
||||
export interface AutocertConfigBase {
|
||||
email: Email;
|
||||
domains: DomainOrWildcard[];
|
||||
@@ -34,6 +34,13 @@ export interface DuckDNSOptions extends AutocertConfigBase {
|
||||
token: string;
|
||||
};
|
||||
}
|
||||
export interface PorkbunOptions extends AutocertConfigBase {
|
||||
provider: "porkbun";
|
||||
options: {
|
||||
api_key: string;
|
||||
secret_api_key: string;
|
||||
};
|
||||
}
|
||||
export declare const OVH_ENDPOINTS: readonly ["ovh-eu", "ovh-ca", "ovh-us", "kimsufi-eu", "kimsufi-ca", "soyoustart-eu", "soyoustart-ca"];
|
||||
export type OVHEndpoint = (typeof OVH_ENDPOINTS)[number];
|
||||
export interface OVHOptionsWithAppKey extends AutocertConfigBase {
|
||||
|
||||
@@ -4,6 +4,7 @@ export const AUTOCERT_PROVIDERS = [
|
||||
"clouddns",
|
||||
"duckdns",
|
||||
"ovh",
|
||||
"porkbun",
|
||||
];
|
||||
export const OVH_ENDPOINTS = [
|
||||
"ovh-eu",
|
||||
|
||||
@@ -6,6 +6,7 @@ export const AUTOCERT_PROVIDERS = [
|
||||
"clouddns",
|
||||
"duckdns",
|
||||
"ovh",
|
||||
"porkbun",
|
||||
] as const;
|
||||
|
||||
export type AutocertProvider = (typeof AUTOCERT_PROVIDERS)[number];
|
||||
@@ -16,7 +17,8 @@ export type AutocertConfig =
|
||||
| CloudDNSOptions
|
||||
| DuckDNSOptions
|
||||
| OVHOptionsWithAppKey
|
||||
| OVHOptionsWithOAuth2Config;
|
||||
| OVHOptionsWithOAuth2Config
|
||||
| PorkbunOptions;
|
||||
|
||||
export interface AutocertConfigBase {
|
||||
/* ACME email */
|
||||
@@ -59,6 +61,13 @@ export interface DuckDNSOptions extends AutocertConfigBase {
|
||||
};
|
||||
}
|
||||
|
||||
export interface PorkbunOptions extends AutocertConfigBase {
|
||||
provider: "porkbun";
|
||||
options: {
|
||||
api_key: string;
|
||||
secret_api_key: string;
|
||||
};
|
||||
}
|
||||
export const OVH_ENDPOINTS = [
|
||||
"ovh-eu",
|
||||
"ovh-ca",
|
||||
|
||||
Reference in New Issue
Block a user