proxy: support registerable usage info

This commit is contained in:
nadoo committed 2022-02-15 21:34:55 +08:00
1 parent d05d71e591
commit cc63a59f1e
22 files changed
+383 -312

No files matched your search

+9
View File
@@ -66,3 +66,12 @@ func DialerFromURL(s string, dialer Dialer) (Dialer, error) {
return nil, errors.New("unknown scheme '" + scheme + "'")
}
// DialerSchemes returns the registered dialer schemes.
func DialerSchemes() string {
s := make([]string, 0, len(dialerCreators))
for name := range dialerCreators {
s = append(s, name)
}
return strings.Join(s, ",")
}