mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
frpc: consider include configs for verify and reload command (#2424)
This commit is contained in:
@@ -56,7 +56,6 @@ func (pa *Allocator) GetByName(portName string) int {
|
||||
return 0
|
||||
}
|
||||
|
||||
// TODO: Distinguish between TCP and UDP
|
||||
l, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", port))
|
||||
if err != nil {
|
||||
// Maybe not controlled by us, mark it used.
|
||||
|
@@ -59,9 +59,11 @@ func WithRangePorts(from, to int) NameOption {
|
||||
}
|
||||
|
||||
func GenName(name string, options ...NameOption) string {
|
||||
name = strings.ReplaceAll(name, "-", "")
|
||||
name = strings.ReplaceAll(name, "_", "")
|
||||
builder := &nameBuilder{name: name}
|
||||
for _, option := range options {
|
||||
option(builder)
|
||||
builder = option(builder)
|
||||
}
|
||||
return builder.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user