Move just a spectacular amount of config stuff into a config package because

This commit is contained in:
eyedeekay
2024-11-30 19:18:01 -05:00
parent 86e5b7c368
commit 058a02e6cc
2 changed files with 10 additions and 10 deletions

View File

@ -96,16 +96,6 @@ func (f *I2PConfig) Leasesetsettings() (string, string, string) {
return r, s, t
}
// SessionStyle returns the session style setting in the form of "STYLE=style"
func (f *I2PConfig) SessionStyle() string {
if f.SessionOptions.Style != "" {
log.WithField("style", f.SessionOptions.Style).Debug("Session style set")
return " STYLE=" + f.SessionOptions.Style + " "
}
log.Debug("Using default STREAM style")
return " STYLE=STREAM "
}
// MinSAM returns the minimum SAM version required in major.minor form
func (f *I2PConfig) MinSAM() string {
min, _ := f.GetVersions()

View File

@ -71,3 +71,13 @@ func (f *SessionOptions) ToPort() string {
log.Debug("ToPort not set")
return ""
}
// SessionStyle returns the session style setting in the form of "STYLE=style"
func (f *SessionOptions) SessionStyle() string {
if f.Style != "" {
log.WithField("style", f.Style).Debug("Session style set")
return " STYLE=" + f.Style + " "
}
log.Debug("Using default STREAM style")
return " STYLE=STREAM "
}