Work on supporting and using certificates.

This commit is contained in:
Storm Dragon
2025-12-12 18:34:23 -05:00
parent 331055ab18
commit 0700264afe
3 changed files with 112 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ type exportableConfig struct {
NoiseSuppressionEnabled *bool
NoiseSuppressionThreshold *float32
VoiceEffect *int
Certificate *string
}
type server struct {
@@ -129,6 +130,10 @@ func (c *Config) LoadConfig() {
effect := 0 // Default to EffectNone
jc.VoiceEffect = &effect
}
if c.config.Certificate == nil {
cert := string("")
jc.Certificate = &cert
}
}
func (c *Config) findServer(address string) *server {
@@ -214,6 +219,10 @@ func (c *Config) GetUsername() *string {
return c.config.Username
}
func (c *Config) GetCertificate() *string {
return c.config.Certificate
}
func (c *Config) GetNoiseSuppressionEnabled() bool {
if c.config.NoiseSuppressionEnabled == nil {
return false