{"record":{"id":"e7eaf416d0fc4d0b","repo":"AlistGo/alist","slug":"unsupported-proxy-type-s","errorCode":null,"errorMessage":"unsupported proxy type: %s","messagePattern":"unsupported proxy type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/frp/frp.go","lineNumber":331,"sourceCode":"\t\t}\n\t\tp := &v1.TCPProxyConfig{}\n\t\tp.Name = proxyName\n\t\tp.Type = \"tcp\"\n\t\tp.ProxyBackend = backend\n\t\tp.RemotePort = remotePort\n\t\tproxyCfgs = append(proxyCfgs, p)\n\n\tcase \"stcp\":\n\t\tp := &v1.STCPProxyConfig{}\n\t\tp.Name = proxyName\n\t\tp.Type = \"stcp\"\n\t\tp.ProxyBackend = backend\n\t\tp.Secretkey = stcpSecretKey\n\t\tp.AllowUsers = []string{\"*\"}\n\t\tproxyCfgs = append(proxyCfgs, p)\n\n\tdefault:\n\t\treturn nil, nil, fmt.Errorf(\"unsupported proxy type: %s\", proxyType)\n\t}\n\n\treturn cfg, proxyCfgs, nil\n}\n","sourceCodeStart":313,"sourceCodeEnd":336,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/internal/frp/frp.go#L313-L336","documentation":"Returned by buildConfig's proxy-type switch when conf.FRPProxyType is not one of the supported values (http, https, tcp, stcp). The default branch catches typos and unrecognized types before an frp client config can be produced.","triggerScenarios":"Setting FRPProxyType to values like 'HTTP' (case-sensitive), 'websocket', 'udp', or any string outside the four supported types, then starting FRP.","commonSituations":"Typo in the settings field; copying proxy type from newer frp docs (udp/sudp/xtcp) that this build does not support; case mismatch.","solutions":["Set FRPProxyType to exactly one of: http, https, tcp, stcp (lowercase).","If you need udp/xtcp, upgrade to a version that supports it or extend the switch yourself.","Add validation/dropdown in the settings UI so invalid values cannot be saved."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var validProxyTypes = map[string]bool{\"http\": true, \"https\": true, \"tcp\": true, \"stcp\": true}\nif !validProxyTypes[proxyType] {\n    return fmt.Errorf(\"proxy type must be one of http, https, tcp, stcp\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict the setting to a fixed enum in the UI.","Normalize to lowercase before saving/using.","When upgrading frp-related code, re-check the supported type list in buildConfig."],"tags":["frp","configuration","validation","enum","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}