channel 表添加 IP 白名单字段用于快照保存与展示
This commit is contained in:
@@ -512,6 +512,7 @@ func assignShortChannels(
|
||||
if config.AuthIp {
|
||||
portConf.Whitelist = &config.Whitelists
|
||||
newChannel.AuthIP = true
|
||||
newChannel.Whitelists = strings.Join(config.Whitelists, ",")
|
||||
}
|
||||
|
||||
if config.AuthPass {
|
||||
@@ -637,6 +638,9 @@ func assignLongChannels(q *q.Query, userId int32, count int, config ChannelCreat
|
||||
ProxyHost: edge.Host,
|
||||
ProxyPort: edge.ProxyPort,
|
||||
}
|
||||
if config.AuthIp {
|
||||
channel.Whitelists = strings.Join(config.Whitelists, ",")
|
||||
}
|
||||
if config.AuthPass {
|
||||
username, password := genPassPair()
|
||||
channel.Username = username
|
||||
|
||||
Reference in New Issue
Block a user