Skip to content

Commit 223ae9e

Browse files
authored
Merge pull request #751 from tobychui/v3.2.5
* Added new API endpoint /api/proxy/setTlsConfig (for HTTP Proxy Editor TLS tab) * Refactored TLS certificate management APIs with new handlers * Removed redundant functions from src/cert.go and delegated to tlsCertManager * Code optimization in tlscert module * Introduced a new constant CONF_FOLDER and updated configuration storage paths (phasing out hard coded paths) * Updated functions to set default TLS options when missing, default to SNI By @jemmy1794 * Added Proxy Protocol v1 support in stream proxy * Fixed Proxy UI bug
2 parents a0a3948 + aff1975 commit 223ae9e

33 files changed

+1675
-1999
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ Some section of Zoraxy are contributed by our amazing community and if you have
200200

201201
- Docker Container List by [@eyerrock](https://github.com/eyerrock)
202202

203+
- Stream Proxy [@jemmy1794](https://github.com/jemmy1794)
204+
205+
- Change Log [@Morethanevil](https://github.com/Morethanevil)
206+
203207
### Looking for Maintainer
204208

205209
- ACME DNS Challenge Module

src/api.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func RegisterHTTPProxyAPIs(authRouter *auth.RouterDef) {
3434
authRouter.HandleFunc("/api/proxy/detail", ReverseProxyListDetail)
3535
authRouter.HandleFunc("/api/proxy/edit", ReverseProxyHandleEditEndpoint)
3636
authRouter.HandleFunc("/api/proxy/setAlias", ReverseProxyHandleAlias)
37+
authRouter.HandleFunc("/api/proxy/setTlsConfig", ReverseProxyHandleSetTlsConfig)
3738
authRouter.HandleFunc("/api/proxy/setHostname", ReverseProxyHandleSetHostname)
3839
authRouter.HandleFunc("/api/proxy/del", DeleteProxyEndpoint)
3940
authRouter.HandleFunc("/api/proxy/updateCredentials", UpdateProxyBasicAuthCredentials)
@@ -71,14 +72,20 @@ func RegisterHTTPProxyAPIs(authRouter *auth.RouterDef) {
7172

7273
// Register the APIs for TLS / SSL certificate management functions
7374
func RegisterTLSAPIs(authRouter *auth.RouterDef) {
75+
//Global certificate settings
7476
authRouter.HandleFunc("/api/cert/tls", handleToggleTLSProxy)
7577
authRouter.HandleFunc("/api/cert/tlsRequireLatest", handleSetTlsRequireLatest)
76-
authRouter.HandleFunc("/api/cert/upload", handleCertUpload)
77-
authRouter.HandleFunc("/api/cert/download", handleCertDownload)
78-
authRouter.HandleFunc("/api/cert/list", handleListCertificate)
79-
authRouter.HandleFunc("/api/cert/listdomains", handleListDomains)
80-
authRouter.HandleFunc("/api/cert/checkDefault", handleDefaultCertCheck)
81-
authRouter.HandleFunc("/api/cert/delete", handleCertRemove)
78+
authRouter.HandleFunc("/api/cert/resolve", handleCertTryResolve)
79+
authRouter.HandleFunc("/api/cert/setPreferredCertificate", handleSetDomainPreferredCertificate)
80+
81+
//Certificate store functions
82+
authRouter.HandleFunc("/api/cert/upload", tlsCertManager.HandleCertUpload)
83+
authRouter.HandleFunc("/api/cert/download", tlsCertManager.HandleCertDownload)
84+
authRouter.HandleFunc("/api/cert/list", tlsCertManager.HandleListCertificate)
85+
authRouter.HandleFunc("/api/cert/listdomains", tlsCertManager.HandleListDomains)
86+
authRouter.HandleFunc("/api/cert/checkDefault", tlsCertManager.HandleDefaultCertCheck)
87+
authRouter.HandleFunc("/api/cert/delete", tlsCertManager.HandleCertRemove)
88+
authRouter.HandleFunc("/api/cert/selfsign", tlsCertManager.HandleSelfSignCertGenerate)
8289
}
8390

8491
// Register the APIs for Authentication handlers like Forward Auth and OAUTH2

0 commit comments

Comments
 (0)