Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/backend/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ import (
"github.com/hannes/kiji-private/src/backend/providers"
)

// DefaultForwardProxyPort is the default port for the forward proxy.
const DefaultForwardProxyPort = ":8080"

// DefaultTransparentProxyPort is the default port for the transparent proxy.
const DefaultTransparentProxyPort = ":8081"

// LoggingConfig holds logging configuration options
type LoggingConfig struct {
LogRequests bool // Log request content
Expand Down Expand Up @@ -242,7 +248,7 @@ func DefaultConfig() *Config {
MistralProviderConfig: defaultMistralProviderConfig,
CustomProviderConfig: defaultCustomProviderConfig,
},
ProxyPort: ":8080",
ProxyPort: DefaultForwardProxyPort,
ONNXModelPath: "",
TokenizerPath: "",
ModelVariant: ModelVariantTrained,
Expand All @@ -261,7 +267,7 @@ func DefaultConfig() *Config {
},
Proxy: ProxyConfig{
TransparentEnabled: true,
ProxyPort: ":8081",
ProxyPort: DefaultTransparentProxyPort,
CAPath: caPath,
KeyPath: keyPath,
EnablePAC: true, // Enable PAC by default for automatic proxy configuration
Expand Down
2 changes: 1 addition & 1 deletion src/backend/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (s *Server) Start() error {
func (s *Server) startTransparentProxy() {
proxyPort := s.config.Proxy.ProxyPort
if proxyPort == "" {
proxyPort = ":8080"
proxyPort = config.DefaultForwardProxyPort
}

log.Printf("Starting transparent proxy on port %s", proxyPort)
Expand Down
Loading