MCPcopy Create free account

hub / github.com/Gsy-allen/emby-reverse-proxy-go / functions

Functions228 in github.com/Gsy-allen/emby-reverse-proxy-go

↓ 49 callersFunctionrewriteBody
rewriteBody scans for absolute URLs in Emby text responses and rewrites them back to proxy URLs. Emby may return stream URLs on different upstream hos
rewriter.go:97
↓ 26 callersFunctionshouldRewriteEmbyResponse
(t *target, contentType string)
rewriter.go:85
↓ 19 callersFunctionnewUnsafeTestProxyHandler
()
handler_http_test.go:17
↓ 18 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
handler.go:97
↓ 18 callersFunctionrewriteSingleURL
(rawURL, baseURL string)
rewriter.go:246
↓ 15 callersFunctionlogExpectedDisconnect
(err error, format string, args ...any)
websocket.go:471
↓ 14 callersFunctionassertResponseStatus
(t *testing.T, rr *httptest.ResponseRecorder, want int)
handler_http_test.go:42
↓ 13 callersFunctionNewProxyHandler
(blockPrivateTargets bool)
handler.go:63
↓ 12 callersFunctionwithEnv
(t *testing.T, key, value string)
handler_http_test.go:56
↓ 7 callersFunctiontargetHostPort
(t *target)
target.go:89
↓ 6 callersFunctionassertBodyContains
(t *testing.T, body, want string)
handler_http_test.go:49
↓ 6 callersFunctionnewProxyRequest
(method, path string)
handler_http_test.go:23
↓ 6 callersFunctiontargetRequestPath
(t *target)
target.go:96
↓ 5 callersFunctionnormalizeTargetHost
(host string)
target.go:259
↓ 5 callersFunctionserveProxyRequest
(t *testing.T, upstream http.HandlerFunc, requestPath string)
handler_http_test.go:30
↓ 4 callersMethoddialTargetConn
(ctx context.Context, t *target, rt *resolvedTarget)
websocket.go:122
↓ 4 callersFunctionfirstEnvValue
(keys ...string)
target.go:215
↓ 4 callersFunctionformatBytes
(b int64)
handler.go:291
↓ 4 callersFunctionproxyURLForTarget
(t *target)
websocket.go:153
↓ 4 callersFunctionshouldRewriteBody
(contentType string)
rewriter.go:64
↓ 4 callersFunctionunproxyURL
(raw, forwardedPrefix string)
target.go:234
↓ 3 callersMethoddialAddresses
()
target.go:264
↓ 3 callersFunctioninferBaseURL
(r *http.Request)
target.go:103
↓ 3 callersFunctionisWebSocketRequest
(r *http.Request)
websocket.go:118
↓ 3 callersFunctionparseTarget
(path, query string)
target.go:26
↓ 3 callersFunctionresolveSafeTarget
(ctx context.Context, resolver *net.Resolver, t *target)
target.go:268
↓ 3 callersFunctionsanitizeForwardedPrefix
(raw string)
target.go:119
↓ 3 callersFunctionshouldRewriteEmbyPath
(t *target)
rewriter.go:78
↓ 3 callersFunctiontransportProxyURL
(req *http.Request)
target.go:165
↓ 3 callersFunctiontrimIPv6LiteralBrackets
(host string)
target.go:71
↓ 3 callersFunctionwrapTargetTLS
(ctx context.Context, conn net.Conn, t *target)
websocket.go:349
↓ 3 callersFunctionwriteHijackedHTTPError
(rw *bufio.ReadWriter, statusCode int, message string)
websocket.go:462
↓ 3 callersFunctionwriteWebSocketRequest
(conn net.Conn, r *http.Request, t *target)
websocket.go:362
↓ 2 callersFunctionbuildTargetURL
(t *target)
target.go:54
↓ 2 callersFunctioncopyRequestHeaders
(dst, src http.Header, allowUpgrade bool)
headers.go:41
↓ 2 callersMethoddialContext
(ctx context.Context, network, addr string)
handler.go:161
↓ 2 callersFunctiondialResolvedAddresses
(ctx context.Context, network string, dialer *net.Dialer, addrs []string, onConn func(net.Conn) (net.Conn, err
handler.go:134
↓ 2 callersFunctiondrainBufferedReader
(r *bufio.Reader, dst net.Conn)
websocket.go:432
↓ 2 callersFunctionfirstHeaderValue
(raw string)
target.go:224
↓ 2 callersFunctionisDangerousIP
(ip net.IP)
target.go:346
↓ 2 callersFunctionisDefaultPort
(scheme string, port int)
target.go:161
↓ 2 callersFunctionlooksLikeMedia
(path string)
handler.go:315
↓ 2 callersFunctionnormalizeContentEncoding
(raw string)
headers.go:90
↓ 2 callersFunctionparseBlockPrivateTargets
(raw string)
handler.go:49
↓ 2 callersFunctionproxyAuthorizationHeader
(proxyURL *url.URL)
websocket.go:391
↓ 2 callersFunctionresolveSafeHostIPs
(ctx context.Context, resolver *net.Resolver, host string)
target.go:284
↓ 2 callersFunctionresolvedTargetFromContext
(ctx context.Context)
handler.go:123
↓ 2 callersFunctionresponseAllowsBody
(method string, statusCode int)
handler.go:281
↓ 2 callersFunctionrewriteHeaderURL
(rawURL string, t *target, baseURL string)
rewriter.go:23
↓ 2 callersFunctionrewriteProxySensitiveRequestHeaders
(h http.Header, forwardedPrefix string)
headers.go:63
↓ 2 callersFunctionrewriteResponseHeaders
(resp *http.Response, t *target, baseURL string)
rewriter.go:11
↓ 2 callersFunctionrewriteURLFast
rewriteURLFast rewrites a URL without url.Parse. Input: raw URL bytes like "https://example.com:8096/path?q=1" schemeLen: 7 for http://, 8 for https:/
rewriter.go:158
↓ 2 callersFunctionsetUpstreamHost
(req *http.Request, t *target)
headers.go:75
↓ 2 callersFunctiontargetURLHost
(host string)
target.go:81
↓ 2 callersFunctionvalidateTargetSafety
(ctx context.Context, resolver *net.Resolver, t *target)
target.go:311
↓ 1 callersFunctionbuildDialAddresses
(ips []net.IP, port int)
target.go:276
↓ 1 callersFunctionbuildProxyURL
(baseURL string, t *target, path string)
rewriter.go:36
↓ 1 callersFunctioncanonicalProxyDialAddress
(proxyURL *url.URL)
websocket.go:171
↓ 1 callersFunctioncopyResponseBodyToHijackedClient
(rw *bufio.ReadWriter, body io.Reader)
websocket.go:449
↓ 1 callersFunctioncopyResponseHeaders
(dst, src http.Header)
headers.go:51
↓ 1 callersFunctionestablishWebSocketProxyConnection
(ctx context.Context, conn net.Conn, proxyURL *url.URL, t *target)
websocket.go:190
↓ 1 callersFunctionheaderContainsToken
(h http.Header, key, token string)
headers.go:81
↓ 1 callersFunctionisExpectedDisconnect
(err error)
websocket.go:480
↓ 1 callersFunctionisURLTerminator
(c byte)
rewriter.go:238
↓ 1 callersFunctionproxyEnvValueForScheme
(scheme string)
target.go:184
↓ 1 callersFunctionproxyWebSocketStreams
(clientConn, upstreamConn net.Conn, t *target)
websocket.go:400
↓ 1 callersFunctionresolveTargetIPs
(ctx context.Context, resolver *net.Resolver, host string)
target.go:321
↓ 1 callersFunctionsendConnectRequest
(conn net.Conn, proxyURL *url.URL, connectHost string)
websocket.go:219
↓ 1 callersFunctionsendSOCKS5Connect
(conn net.Conn, proxyURL *url.URL, t *target)
websocket.go:249
↓ 1 callersMethodserveHTTPProxy
(w http.ResponseWriter, r *http.Request, t *target, start time.Time)
handler.go:176
↓ 1 callersMethodserveRewrittenBody
(w http.ResponseWriter, r *http.Request, resp *http.Response, t *target, baseURL string)
handler.go:232
↓ 1 callersMethodserveStreamBody
serveStreamBody pipes upstream to client via io.CopyBuffer with pooled buffer. No intermediate buffering — on Linux this can trigger splice(2).
handler.go:270
↓ 1 callersMethodserveWebSocket
(w http.ResponseWriter, r *http.Request, t *target, rt *resolvedTarget, start time.Time)
websocket.go:23
↓ 1 callersFunctionshouldBypassProxy
(host, noProxy string)
target.go:198
↓ 1 callersFunctionstripForwardedPrefix
(path, forwardedPrefix string)
target.go:143
↓ 1 callersFunctionwebsocketTargetURL
(t *target)
websocket.go:158
FunctionTestBuildTargetURL
(t *testing.T)
target_test.go:180
FunctionTestDialContextFallsBackToNextResolvedTargetAddress
(t *testing.T)
handler_http_test.go:638
FunctionTestDialContextUsesResolvedTargetAddress
(t *testing.T)
handler_http_test.go:602
FunctionTestDialTargetConnRequiresResolvedTargetWhenDNSBlockingEnabled
(t *testing.T)
handler_ws_test.go:726
FunctionTestDialTargetConnUsesHTTPProxyForWebSocket
(t *testing.T)
handler_ws_test.go:159
FunctionTestDialTargetConnUsesSOCKS5ProxyForWebSocket
(t *testing.T)
handler_ws_test.go:208
FunctionTestInferBaseURL
(t *testing.T)
target_test.go:11
FunctionTestIsDangerousIP
(t *testing.T)
target_test.go:266
FunctionTestIsWebSocketRequest
(t *testing.T)
handler_ws_test.go:19
FunctionTestLooksLikeMedia
(t *testing.T)
handler_http_test.go:209
FunctionTestNewProxyHandlerBlockPrivateTargets
(t *testing.T)
target_test.go:357
FunctionTestNormalizeContentEncoding
(t *testing.T)
handler_http_test.go:249
FunctionTestParseBlockPrivateTargets
(t *testing.T)
target_test.go:334
FunctionTestParseTarget
(t *testing.T)
target_test.go:124
FunctionTestProxyFromEnvironmentUsesAllProxyForHTTP
(t *testing.T)
handler_http_test.go:75
FunctionTestProxyFromEnvironmentUsesNoProxyBypass
(t *testing.T)
handler_http_test.go:97
FunctionTestProxyURLForTargetRespectsNoProxy
(t *testing.T)
handler_ws_test.go:144
FunctionTestProxyURLForTargetUsesAllProxy
(t *testing.T)
handler_ws_test.go:127
FunctionTestResolveSafeTarget
(t *testing.T)
target_test.go:317
FunctionTestResolvedTargetFromContextRequiresAddresses
(t *testing.T)
handler_http_test.go:595
FunctionTestResponseAllowsBody
(t *testing.T)
handler_http_emby_rewrite_test.go:134
FunctionTestRewriteBody
(t *testing.T)
rewriter_test.go:89
FunctionTestRewriteBodyAngleBracketTerminator
(t *testing.T)
rewriter_test.go:584
FunctionTestRewriteBodyBackslashTerminator
(t *testing.T)
rewriter_test.go:520
next →1–100 of 228, ranked by callers