mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 16:58:31 +02:00
fix(agent): reduce the size of agent binary by modules separation
This commit is contained in:
@@ -10,15 +10,18 @@ import (
|
||||
"github.com/quic-go/quic-go/http3"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/yusing/go-proxy/internal/acl"
|
||||
"github.com/yusing/go-proxy/internal/autocert"
|
||||
"github.com/yusing/go-proxy/internal/common"
|
||||
"github.com/yusing/go-proxy/internal/logging"
|
||||
"github.com/yusing/go-proxy/internal/task"
|
||||
)
|
||||
|
||||
type CertProvider interface {
|
||||
GetCert(*tls.ClientHelloInfo) (*tls.Certificate, error)
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Name string
|
||||
CertProvider *autocert.Provider
|
||||
CertProvider CertProvider
|
||||
http *http.Server
|
||||
https *http.Server
|
||||
startTime time.Time
|
||||
@@ -31,7 +34,7 @@ type Options struct {
|
||||
Name string
|
||||
HTTPAddr string
|
||||
HTTPSAddr string
|
||||
CertProvider *autocert.Provider
|
||||
CertProvider CertProvider
|
||||
Handler http.Handler
|
||||
ACL *acl.Config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user