small fixes
This commit is contained in:
@@ -127,9 +127,9 @@ func (s *SettingService) getBool(key string) (bool, error) {
|
|||||||
return strconv.ParseBool(str)
|
return strconv.ParseBool(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SettingService) setBool(key string, value bool) error {
|
// func (s *SettingService) setBool(key string, value bool) error {
|
||||||
return s.setString(key, strconv.FormatBool(value))
|
// return s.setString(key, strconv.FormatBool(value))
|
||||||
}
|
// }
|
||||||
|
|
||||||
func (s *SettingService) getInt(key string) (int, error) {
|
func (s *SettingService) getInt(key string) (int, error) {
|
||||||
str, err := s.getString(key)
|
str, err := s.getString(key)
|
||||||
|
|||||||
@@ -191,7 +191,10 @@ export default {
|
|||||||
},
|
},
|
||||||
tlsEnable: {
|
tlsEnable: {
|
||||||
get() { return this.tls.enabled?? false },
|
get() { return this.tls.enabled?? false },
|
||||||
set(newValue: boolean) { this.$props.inbound.tls = newValue ? { enabled: true } : {} }
|
set(newValue: boolean) {
|
||||||
|
this.$props.inbound.tls = newValue ? { enabled: true } : {}
|
||||||
|
this.$props.tls_id.value = 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tlsOptional(): boolean {
|
tlsOptional(): boolean {
|
||||||
return !['hysteria','hysteria2','tuic','naive'].includes(this.$props.inbound.type)
|
return !['hysteria','hysteria2','tuic','naive'].includes(this.$props.inbound.type)
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ export default {
|
|||||||
else {
|
else {
|
||||||
const port = RandomUtil.randomIntRange(10000, 60000)
|
const port = RandomUtil.randomIntRange(10000, 60000)
|
||||||
this.inbound = createInbound("direct",{ tag: "direct-"+port ,listen: "::", listen_port: port })
|
this.inbound = createInbound("direct",{ tag: "direct-"+port ,listen: "::", listen_port: port })
|
||||||
|
this.tls_id.value = 0
|
||||||
this.title = "add"
|
this.title = "add"
|
||||||
}
|
}
|
||||||
this.inboundStats = this.$props.stats
|
this.inboundStats = this.$props.stats
|
||||||
|
|||||||
Reference in New Issue
Block a user