repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/filterencoder.go | modules/logging/filterencoder.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/filters.go | modules/logging/filters.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/cores.go | modules/logging/cores.go | package logging
import (
"go.uber.org/zap/zapcore"
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
)
func init() {
caddy.RegisterModule(MockCore{})
}
// MockCore is a no-op module, purely for testing
type MockCore struct {
zapcore.Core `json:"-"`
}
// CaddyModule retu... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/appendencoder.go | modules/logging/appendencoder.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/filewriter_test_windows.go | modules/logging/filewriter_test_windows.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/logging/encoders.go | modules/logging/encoders.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/metrics/adminmetrics.go | modules/metrics/adminmetrics.go | // Copyright 2020 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/metrics/metrics.go | modules/metrics/metrics.go | // Copyright 2020 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/metrics/metrics_test.go | modules/metrics/metrics_test.go | package metrics
import (
"testing"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
)
func TestMetricsUnmarshalCaddyfile(t *testing.T) {
m := &Metrics{}
d := caddyfile.NewTestDispenser(`metrics bogus`)
err := m.UnmarshalCaddyfile(d)
if err == nil {
t.Errorf("expected error")
}
m = &Metrics{}
d = c... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/internal/network/networkproxy.go | modules/internal/network/networkproxy.go | package network
import (
"errors"
"net/http"
"net/url"
"strings"
"go.uber.org/zap"
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
)
func init() {
caddy.RegisterModule(ProxyFromURL{})
caddy.RegisterModule(ProxyFromNone{})
}
// The "url" proxy source uses the defin... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyevents/app.go | modules/caddyevents/app.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules/caddyevents/eventsconfig/caddyfile.go | modules/caddyevents/eventsconfig/caddyfile.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/notify/notify_windows.go | notify/notify_windows.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/notify/notify_linux.go | notify/notify_linux.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/notify/notify_other.go | notify/notify_other.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/vhost.go | pkg/util/vhost/vhost.go | // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed ... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/https.go | pkg/util/vhost/https.go | // Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/router.go | pkg/util/vhost/router.go | package vhost
import (
"cmp"
"errors"
"slices"
"strings"
"sync"
)
var ErrRouterConfigConflict = errors.New("router config conflict")
type routerByHTTPUser map[string][]*Router
type Routers struct {
indexByDomain map[string]routerByHTTPUser
mutex sync.RWMutex
}
type Router struct {
domain string
locatio... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/http.go | pkg/util/vhost/http.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/resource.go | pkg/util/vhost/resource.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/vhost/https_test.go | pkg/util/vhost/https_test.go | package vhost
import (
"crypto/tls"
"net"
"testing"
"time"
"github.com/stretchr/testify/require"
)
func TestGetHTTPSHostname(t *testing.T) {
require := require.New(t)
l, err := net.Listen("tcp", "127.0.0.1:")
require.NoError(err)
defer l.Close()
var conn net.Conn
go func() {
conn, _ = l.Accept()
req... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/system/system_android.go | pkg/util/system/system_android.go | // Copyright 2024 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/system/system.go | pkg/util/system/system.go | // Copyright 2024 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/util/types.go | pkg/util/util/types.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/util/util.go | pkg/util/util/util.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/util/util_test.go | pkg/util/util/util_test.go | package util
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestRandId(t *testing.T) {
require := require.New(t)
id, err := RandID()
require.NoError(err)
t.Log(id)
require.Equal(16, len(id))
}
func TestGetAuthKey(t *testing.T) {
require := require.New(t)
key := GetAuthKey("1234", 148872000... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/xlog/log_writer.go | pkg/util/xlog/log_writer.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/xlog/ctx.go | pkg/util/xlog/ctx.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/xlog/xlog.go | pkg/util/xlog/xlog.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/limit/writer.go | pkg/util/limit/writer.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/limit/reader.go | pkg/util/limit/reader.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/version/version.go | pkg/util/version/version.go | // Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/tcpmux/httpconnect.go | pkg/util/tcpmux/httpconnect.go | // Copyright 2020 guylewin, guy@lewin.co.il
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/listener.go | pkg/util/net/listener.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/proxyprotocol.go | pkg/util/net/proxyprotocol.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/websocket.go | pkg/util/net/websocket.go | package net
import (
"errors"
"net"
"net/http"
"time"
"golang.org/x/net/websocket"
)
var ErrWebsocketListenerClosed = errors.New("websocket listener closed")
const (
FrpWebsocketPath = "/~!frp"
)
type WebsocketListener struct {
ln net.Listener
acceptCh chan net.Conn
server *http.Server
}
// NewWeb... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/dns.go | pkg/util/net/dns.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/conn.go | pkg/util/net/conn.go | // Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/udp.go | pkg/util/net/udp.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/http.go | pkg/util/net/http.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/kcp.go | pkg/util/net/kcp.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/proxyprotocol_test.go | pkg/util/net/proxyprotocol_test.go | package net
import (
"net"
"testing"
pp "github.com/pires/go-proxyproto"
"github.com/stretchr/testify/require"
)
func TestBuildProxyProtocolHeader(t *testing.T) {
require := require.New(t)
tests := []struct {
name string
srcAddr net.Addr
dstAddr net.Addr
version string
expectError... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/dial.go | pkg/util/net/dial.go | package net
import (
"context"
"net"
"net/url"
libnet "github.com/fatedier/golib/net"
"golang.org/x/net/websocket"
)
func DialHookCustomTLSHeadByte(enableTLS bool, disableCustomTLSHeadByte bool) libnet.AfterHookFunc {
return func(ctx context.Context, c net.Conn, addr string) (context.Context, net.Conn, error) ... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/net/tls.go | pkg/util/net/tls.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/metric/metrics.go | pkg/util/metric/metrics.go | // Copyright 2020 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/metric/date_counter.go | pkg/util/metric/date_counter.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/metric/counter_test.go | pkg/util/metric/counter_test.go | package metric
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestCounter(t *testing.T) {
require := require.New(t)
c := NewCounter()
c.Inc(10)
require.EqualValues(10, c.Count())
c.Dec(5)
require.EqualValues(5, c.Count())
cTmp := c.Snapshot()
require.EqualValues(5, cTmp.Count())
c.Clea... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/metric/counter.go | pkg/util/metric/counter.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/metric/date_counter_test.go | pkg/util/metric/date_counter_test.go | package metric
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestDateCounter(t *testing.T) {
require := require.New(t)
dc := NewDateCounter(3)
dc.Inc(10)
require.EqualValues(10, dc.TodayCount())
dc.Dec(5)
require.EqualValues(5, dc.TodayCount())
counts := dc.GetLastDaysCount(3)
require.... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/log/log.go | pkg/util/log/log.go | // Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/wait/backoff.go | pkg/util/wait/backoff.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/http/server.go | pkg/util/http/server.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/util/http/http.go | pkg/util/http/http.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/token.go | pkg/auth/token.go | // Copyright 2020 guylewin, guy@lewin.co.il
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/oidc.go | pkg/auth/oidc.go | // Copyright 2020 guylewin, guy@lewin.co.il
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/pass.go | pkg/auth/pass.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/auth.go | pkg/auth/auth.go | // Copyright 2020 guylewin, guy@lewin.co.il
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/oidc_test.go | pkg/auth/oidc_test.go | package auth_test
import (
"context"
"testing"
"time"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/stretchr/testify/require"
"github.com/fatedier/frp/pkg/auth"
v1 "github.com/fatedier/frp/pkg/config/v1"
"github.com/fatedier/frp/pkg/msg"
)
type mockTokenVerifier struct{}
func (m *mockTokenVerifier) Verif... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/auth/legacy/legacy.go | pkg/auth/legacy/legacy.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/visitor/virtual_net.go | pkg/plugin/visitor/virtual_net.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/visitor/plugin.go | pkg/plugin/visitor/plugin.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/server/tracer.go | pkg/plugin/server/tracer.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/server/types.go | pkg/plugin/server/types.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/server/http.go | pkg/plugin/server/http.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/server/plugin.go | pkg/plugin/server/plugin.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/server/manager.go | pkg/plugin/server/manager.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/tls2raw.go | pkg/plugin/client/tls2raw.go | // Copyright 2024 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/https2http.go | pkg/plugin/client/https2http.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/unix_domain_socket.go | pkg/plugin/client/unix_domain_socket.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/static_file.go | pkg/plugin/client/static_file.go | // Copyright 2018 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/http_proxy.go | pkg/plugin/client/http_proxy.go | // Copyright 2017 frp team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/http2https.go | pkg/plugin/client/http2https.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/virtual_net.go | pkg/plugin/client/virtual_net.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/http2http.go | pkg/plugin/client/http2http.go | // Copyright 2024 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/plugin.go | pkg/plugin/client/plugin.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/socks5.go | pkg/plugin/client/socks5.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/plugin/client/https2https.go | pkg/plugin/client/https2https.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/tun_unsupported.go | pkg/vnet/tun_unsupported.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/controller.go | pkg/vnet/controller.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/tun_linux.go | pkg/vnet/tun_linux.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/message.go | pkg/vnet/message.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/tun.go | pkg/vnet/tun.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/vnet/tun_darwin.go | pkg/vnet/tun_darwin.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/proto/udp/udp_test.go | pkg/proto/udp/udp_test.go | package udp
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestUdpPacket(t *testing.T) {
require := require.New(t)
buf := []byte("hello world")
udpMsg := NewUDPPacket(buf, nil, nil)
newBuf, err := GetContent(udpMsg)
require.NoError(err)
require.EqualValues(buf, newBuf)
}
| go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/proto/udp/udp.go | pkg/proto/udp/udp.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/errors/errors.go | pkg/errors/errors.go | // Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/metrics/metrics.go | pkg/metrics/metrics.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/metrics/aggregate/server.go | pkg/metrics/aggregate/server.go | // Copyright 2020 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/metrics/prometheus/server.go | pkg/metrics/prometheus/server.go | package prometheus
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/fatedier/frp/server/metrics"
)
const (
namespace = "frp"
serverSubsystem = "server"
)
var ServerMetrics metrics.ServerMetrics = newServerMetrics()
type serverMetrics struct {
clientCount prometheus.Gauge
pro... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/metrics/mem/types.go | pkg/metrics/mem/types.go | // Copyright 2017 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/metrics/mem/server.go | pkg/metrics/mem/server.go | // Copyright 2019 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/ssh/terminal.go | pkg/ssh/terminal.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/ssh/server.go | pkg/ssh/server.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/ssh/gateway.go | pkg/ssh/gateway.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/virtual/client.go | pkg/virtual/client.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/config/flags.go | pkg/config/flags.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/config/load.go | pkg/config/load.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/config/load_test.go | pkg/config/load_test.go | // Copyright 2023 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/config/template.go | pkg/config/template.go | // Copyright 2024 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
fatedier/frp | https://github.com/fatedier/frp/blob/33428ab538b7c55d46c70e2f04cc153f2400cd5b/pkg/config/v1/value_source_test.go | pkg/config/v1/value_source_test.go | // Copyright 2025 The frp Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | go | Apache-2.0 | 33428ab538b7c55d46c70e2f04cc153f2400cd5b | 2026-01-07T08:35:43.420197Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.