Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Gsy-allen/emby-reverse-proxy-go
/ functions
Functions
228 in github.com/Gsy-allen/emby-reverse-proxy-go
⨍
Functions
228
◇
Types & classes
5
↓ 49 callers
Function
rewriteBody
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 callers
Function
shouldRewriteEmbyResponse
(t *target, contentType string)
rewriter.go:85
↓ 19 callers
Function
newUnsafeTestProxyHandler
()
handler_http_test.go:17
↓ 18 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
handler.go:97
↓ 18 callers
Function
rewriteSingleURL
(rawURL, baseURL string)
rewriter.go:246
↓ 15 callers
Function
logExpectedDisconnect
(err error, format string, args ...any)
websocket.go:471
↓ 14 callers
Function
assertResponseStatus
(t *testing.T, rr *httptest.ResponseRecorder, want int)
handler_http_test.go:42
↓ 13 callers
Function
NewProxyHandler
(blockPrivateTargets bool)
handler.go:63
↓ 12 callers
Function
withEnv
(t *testing.T, key, value string)
handler_http_test.go:56
↓ 7 callers
Function
targetHostPort
(t *target)
target.go:89
↓ 6 callers
Function
assertBodyContains
(t *testing.T, body, want string)
handler_http_test.go:49
↓ 6 callers
Function
newProxyRequest
(method, path string)
handler_http_test.go:23
↓ 6 callers
Function
targetRequestPath
(t *target)
target.go:96
↓ 5 callers
Function
normalizeTargetHost
(host string)
target.go:259
↓ 5 callers
Function
serveProxyRequest
(t *testing.T, upstream http.HandlerFunc, requestPath string)
handler_http_test.go:30
↓ 4 callers
Method
dialTargetConn
(ctx context.Context, t *target, rt *resolvedTarget)
websocket.go:122
↓ 4 callers
Function
firstEnvValue
(keys ...string)
target.go:215
↓ 4 callers
Function
formatBytes
(b int64)
handler.go:291
↓ 4 callers
Function
proxyURLForTarget
(t *target)
websocket.go:153
↓ 4 callers
Function
shouldRewriteBody
(contentType string)
rewriter.go:64
↓ 4 callers
Function
unproxyURL
(raw, forwardedPrefix string)
target.go:234
↓ 3 callers
Method
dialAddresses
()
target.go:264
↓ 3 callers
Function
inferBaseURL
(r *http.Request)
target.go:103
↓ 3 callers
Function
isWebSocketRequest
(r *http.Request)
websocket.go:118
↓ 3 callers
Function
parseTarget
(path, query string)
target.go:26
↓ 3 callers
Function
resolveSafeTarget
(ctx context.Context, resolver *net.Resolver, t *target)
target.go:268
↓ 3 callers
Function
sanitizeForwardedPrefix
(raw string)
target.go:119
↓ 3 callers
Function
shouldRewriteEmbyPath
(t *target)
rewriter.go:78
↓ 3 callers
Function
transportProxyURL
(req *http.Request)
target.go:165
↓ 3 callers
Function
trimIPv6LiteralBrackets
(host string)
target.go:71
↓ 3 callers
Function
wrapTargetTLS
(ctx context.Context, conn net.Conn, t *target)
websocket.go:349
↓ 3 callers
Function
writeHijackedHTTPError
(rw *bufio.ReadWriter, statusCode int, message string)
websocket.go:462
↓ 3 callers
Function
writeWebSocketRequest
(conn net.Conn, r *http.Request, t *target)
websocket.go:362
↓ 2 callers
Function
buildTargetURL
(t *target)
target.go:54
↓ 2 callers
Function
copyRequestHeaders
(dst, src http.Header, allowUpgrade bool)
headers.go:41
↓ 2 callers
Method
dialContext
(ctx context.Context, network, addr string)
handler.go:161
↓ 2 callers
Function
dialResolvedAddresses
(ctx context.Context, network string, dialer *net.Dialer, addrs []string, onConn func(net.Conn) (net.Conn, err
handler.go:134
↓ 2 callers
Function
drainBufferedReader
(r *bufio.Reader, dst net.Conn)
websocket.go:432
↓ 2 callers
Function
firstHeaderValue
(raw string)
target.go:224
↓ 2 callers
Function
isDangerousIP
(ip net.IP)
target.go:346
↓ 2 callers
Function
isDefaultPort
(scheme string, port int)
target.go:161
↓ 2 callers
Function
looksLikeMedia
(path string)
handler.go:315
↓ 2 callers
Function
normalizeContentEncoding
(raw string)
headers.go:90
↓ 2 callers
Function
parseBlockPrivateTargets
(raw string)
handler.go:49
↓ 2 callers
Function
proxyAuthorizationHeader
(proxyURL *url.URL)
websocket.go:391
↓ 2 callers
Function
resolveSafeHostIPs
(ctx context.Context, resolver *net.Resolver, host string)
target.go:284
↓ 2 callers
Function
resolvedTargetFromContext
(ctx context.Context)
handler.go:123
↓ 2 callers
Function
responseAllowsBody
(method string, statusCode int)
handler.go:281
↓ 2 callers
Function
rewriteHeaderURL
(rawURL string, t *target, baseURL string)
rewriter.go:23
↓ 2 callers
Function
rewriteProxySensitiveRequestHeaders
(h http.Header, forwardedPrefix string)
headers.go:63
↓ 2 callers
Function
rewriteResponseHeaders
(resp *http.Response, t *target, baseURL string)
rewriter.go:11
↓ 2 callers
Function
rewriteURLFast
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 callers
Function
setUpstreamHost
(req *http.Request, t *target)
headers.go:75
↓ 2 callers
Function
targetURLHost
(host string)
target.go:81
↓ 2 callers
Function
validateTargetSafety
(ctx context.Context, resolver *net.Resolver, t *target)
target.go:311
↓ 1 callers
Function
buildDialAddresses
(ips []net.IP, port int)
target.go:276
↓ 1 callers
Function
buildProxyURL
(baseURL string, t *target, path string)
rewriter.go:36
↓ 1 callers
Function
canonicalProxyDialAddress
(proxyURL *url.URL)
websocket.go:171
↓ 1 callers
Function
copyResponseBodyToHijackedClient
(rw *bufio.ReadWriter, body io.Reader)
websocket.go:449
↓ 1 callers
Function
copyResponseHeaders
(dst, src http.Header)
headers.go:51
↓ 1 callers
Function
establishWebSocketProxyConnection
(ctx context.Context, conn net.Conn, proxyURL *url.URL, t *target)
websocket.go:190
↓ 1 callers
Function
headerContainsToken
(h http.Header, key, token string)
headers.go:81
↓ 1 callers
Function
isExpectedDisconnect
(err error)
websocket.go:480
↓ 1 callers
Function
isURLTerminator
(c byte)
rewriter.go:238
↓ 1 callers
Function
proxyEnvValueForScheme
(scheme string)
target.go:184
↓ 1 callers
Function
proxyWebSocketStreams
(clientConn, upstreamConn net.Conn, t *target)
websocket.go:400
↓ 1 callers
Function
resolveTargetIPs
(ctx context.Context, resolver *net.Resolver, host string)
target.go:321
↓ 1 callers
Function
sendConnectRequest
(conn net.Conn, proxyURL *url.URL, connectHost string)
websocket.go:219
↓ 1 callers
Function
sendSOCKS5Connect
(conn net.Conn, proxyURL *url.URL, t *target)
websocket.go:249
↓ 1 callers
Method
serveHTTPProxy
(w http.ResponseWriter, r *http.Request, t *target, start time.Time)
handler.go:176
↓ 1 callers
Method
serveRewrittenBody
(w http.ResponseWriter, r *http.Request, resp *http.Response, t *target, baseURL string)
handler.go:232
↓ 1 callers
Method
serveStreamBody
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 callers
Method
serveWebSocket
(w http.ResponseWriter, r *http.Request, t *target, rt *resolvedTarget, start time.Time)
websocket.go:23
↓ 1 callers
Function
shouldBypassProxy
(host, noProxy string)
target.go:198
↓ 1 callers
Function
stripForwardedPrefix
(path, forwardedPrefix string)
target.go:143
↓ 1 callers
Function
websocketTargetURL
(t *target)
websocket.go:158
Function
TestBuildTargetURL
(t *testing.T)
target_test.go:180
Function
TestDialContextFallsBackToNextResolvedTargetAddress
(t *testing.T)
handler_http_test.go:638
Function
TestDialContextUsesResolvedTargetAddress
(t *testing.T)
handler_http_test.go:602
Function
TestDialTargetConnRequiresResolvedTargetWhenDNSBlockingEnabled
(t *testing.T)
handler_ws_test.go:726
Function
TestDialTargetConnUsesHTTPProxyForWebSocket
(t *testing.T)
handler_ws_test.go:159
Function
TestDialTargetConnUsesSOCKS5ProxyForWebSocket
(t *testing.T)
handler_ws_test.go:208
Function
TestInferBaseURL
(t *testing.T)
target_test.go:11
Function
TestIsDangerousIP
(t *testing.T)
target_test.go:266
Function
TestIsWebSocketRequest
(t *testing.T)
handler_ws_test.go:19
Function
TestLooksLikeMedia
(t *testing.T)
handler_http_test.go:209
Function
TestNewProxyHandlerBlockPrivateTargets
(t *testing.T)
target_test.go:357
Function
TestNormalizeContentEncoding
(t *testing.T)
handler_http_test.go:249
Function
TestParseBlockPrivateTargets
(t *testing.T)
target_test.go:334
Function
TestParseTarget
(t *testing.T)
target_test.go:124
Function
TestProxyFromEnvironmentUsesAllProxyForHTTP
(t *testing.T)
handler_http_test.go:75
Function
TestProxyFromEnvironmentUsesNoProxyBypass
(t *testing.T)
handler_http_test.go:97
Function
TestProxyURLForTargetRespectsNoProxy
(t *testing.T)
handler_ws_test.go:144
Function
TestProxyURLForTargetUsesAllProxy
(t *testing.T)
handler_ws_test.go:127
Function
TestResolveSafeTarget
(t *testing.T)
target_test.go:317
Function
TestResolvedTargetFromContextRequiresAddresses
(t *testing.T)
handler_http_test.go:595
Function
TestResponseAllowsBody
(t *testing.T)
handler_http_emby_rewrite_test.go:134
Function
TestRewriteBody
(t *testing.T)
rewriter_test.go:89
Function
TestRewriteBodyAngleBracketTerminator
(t *testing.T)
rewriter_test.go:584
Function
TestRewriteBodyBackslashTerminator
(t *testing.T)
rewriter_test.go:520
next →
1–100 of 228, ranked by callers