small fixes

This commit is contained in:
Alireza Ahmadi
2024-06-13 20:16:29 +02:00
parent b144aecb6a
commit db3270feaa
3 changed files with 8 additions and 4 deletions
+3 -3
View File
@@ -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)
+4 -1
View File
@@ -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)
+1
View File
@@ -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