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 |
|---|---|---|---|---|---|---|---|---|
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/constant/goos/zgoos_darwin.go | Bcore/windows/resources/sing-box-main/constant/goos/zgoos_darwin.go | // Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
//go:build !ios && darwin
package goos
const GOOS = `darwin`
const IsAix = 0
const IsAndroid = 0
const IsDarwin = 1
const IsDragonfly = 0
const IsFreebsd = 0
const IsHurd = 0
const IsIllumos = 0
const IsIos = 0
const IsJs = 0
const IsLinux = 0
const ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/update_apple_version/main.go | Bcore/windows/resources/sing-box-main/cmd/internal/update_apple_version/main.go | package main
import (
"os"
"path/filepath"
"regexp"
"strings"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
"howett.net/plist"
)
func main() {
newVersion := common.Must1(build_shared.ReadTagVersion())
applePath, err := filepat... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/update_android_version/main.go | Bcore/windows/resources/sing-box-main/cmd/internal/update_android_version/main.go | package main
import (
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
)
func main() {
newVersion := common.Must1(build_shared.ReadTagVersion())
androidPath, err := filepath.Abs("... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/build_shared/sdk.go | Bcore/windows/resources/sing-box-main/cmd/internal/build_shared/sdk.go | package build_shared
import (
"go/build"
"os"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/rw"
"github.com/sagernet/sing/common/shell"
)
var (
andr... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/build_shared/tag.go | Bcore/windows/resources/sing-box-main/cmd/internal/build_shared/tag.go | package build_shared
import (
"github.com/sagernet/sing-box/common/badversion"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/shell"
)
func ReadTag() (string, error) {
currentTag, err := shell.Exec("git", "describe", "--tags").ReadOutput()
if err != nil {
return currentTag, err
}
currentT... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/protogen/main.go | Bcore/windows/resources/sing-box-main/cmd/internal/protogen/main.go | package main
import (
"bufio"
"bytes"
"fmt"
"go/build"
"io"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
)
// envFile returns the name of the Go environment configuration file.
// Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb754938/src/cmd/go/internal/cfg/cfg.go#L150-L... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/build_libbox/main.go | Bcore/windows/resources/sing-box-main/cmd/internal/build_libbox/main.go | package main
import (
"flag"
"os"
"os/exec"
"path/filepath"
"strings"
_ "github.com/sagernet/gomobile"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common/rw"
)
var (
debugEnabled bool
target string
)
func init() {
flag.BoolV... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/internal/read_tag/main.go | Bcore/windows/resources/sing-box-main/cmd/internal/read_tag/main.go | package main
import (
"os"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
)
func main() {
currentTag, err := build_shared.ReadTag()
if err != nil {
log.Error(err)
_, err = os.Stdout.WriteString("1.10.1\n")
} else {
_, err = os.Stdout.WriteString(currentTag + "... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_version.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_version.go | package main
import (
"os"
"runtime"
"runtime/debug"
C "github.com/sagernet/sing-box/constant"
"github.com/spf13/cobra"
)
var commandVersion = &cobra.Command{
Use: "version",
Short: "Print current version of sing-box",
Run: printVersion,
Args: cobra.NoArgs,
}
var nameOnly bool
func init() {
command... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_connect.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_connect.go | package main
import (
"context"
"os"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/bufio"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
"github.com/sagernet/sing/c... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_upgrade.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_upgrade.go | package main
import (
"bytes"
"io"
"os"
"path/filepath"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com/spf13/cobra"
)
var commandRuleSetUpgr... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_synctime.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_synctime.go | package main
import (
"context"
"os"
"github.com/sagernet/sing-box/common/settings"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
"github.com/... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_compile.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_compile.go | package main
import (
"io"
"os"
"strings"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/json"
"github.com/spf13/cobra"
)
var flagRuleSetCompileOutput string
const... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate.go | package main
import (
"crypto/rand"
"encoding/base64"
"encoding/hex"
"os"
"strconv"
"github.com/sagernet/sing-box/log"
"github.com/gofrs/uuid/v5"
"github.com/spf13/cobra"
)
var commandGenerate = &cobra.Command{
Use: "generate",
Short: "Generate things",
}
func init() {
commandGenerate.AddCommand(comma... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite.go | package main
import (
"github.com/sagernet/sing-box/common/geosite"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
"github.com/spf13/cobra"
)
var (
commandGeoSiteFlagFile string
geositeReader *geosite.Reader
geositeCodeList []string
)
var commandGeoSite = &c... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_export.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_export.go | package main
import (
"io"
"os"
"github.com/sagernet/sing-box/common/geosite"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/json"
"github.com/spf13/cobra"
)
var commandGeositeExportOutput string
const comm... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip.go | package main
import (
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
"github.com/oschwald/maxminddb-golang"
"github.com/spf13/cobra"
)
var (
geoipReader *maxminddb.Reader
commandGeoIPFlagFile string
)
var commandGeoip = &cobra.Command{
Use: "geoip",
Short: "GeoI... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_format.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_format.go | package main
import (
"bytes"
"os"
"path/filepath"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com/sagernet/sing/common/json/badjson"
"github.com/spf13/cobra"
)
var commandFormatFlagWrite bool
var commandFormat = &cobra.Co... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_format.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_format.go | package main
import (
"bytes"
"io"
"os"
"path/filepath"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com/spf13/cobra"
)
var commandRuleSetFormatFlagWrite bool
var commandRuleSetFormat ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_convert.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_convert.go | package main
import (
"io"
"os"
"strings"
"github.com/sagernet/sing-box/cmd/sing-box/internal/convertor/adguard"
"github.com/sagernet/sing-box/common/srs"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/spf13/cobra"
)
var (... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_check.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_check.go | package main
import (
"context"
"github.com/sagernet/sing-box"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
)
var commandCheck = &cobra.Command{
Use: "check",
Short: "Check configuration",
Run: func(cmd *cobra.Command, args []string) {
err := check()
if err != nil {
log.Fatal(err)
}... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch_http3_stub.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch_http3_stub.go | //go:build !with_quic
package main
import (
"net/url"
"os"
box "github.com/sagernet/sing-box"
)
func initializeHTTP3Client(instance *box.Box) error {
return os.ErrInvalid
}
func fetchHTTP3(parsedURL *url.URL) error {
return os.ErrInvalid
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_vapid.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_vapid.go | //go:build go1.20
package main
import (
"crypto/ecdh"
"crypto/rand"
"encoding/base64"
"os"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
)
var commandGenerateVAPIDKeyPair = &cobra.Command{
Use: "vapid-keypair",
Short: "Generate VAPID key pair",
Run: func(cmd *cobra.Command, args []string) ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_export.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_export.go | package main
import (
"io"
"net"
"os"
"strings"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com/oschwald/maxminddb-golang"
"github.com/spf13/... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_run.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_run.go | package main
import (
"context"
"io"
"os"
"os/signal"
"path/filepath"
runtimeDebug "runtime/debug"
"sort"
"strings"
"syscall"
"time"
"github.com/sagernet/sing-box"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/s... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_decompile.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_decompile.go | package main
import (
"io"
"os"
"strings"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/json"
"github.com/spf13/cobra"
)
var flagRuleSetDecompileOutput string
con... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_wireguard.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_wireguard.go | package main
import (
"encoding/base64"
"os"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
func init() {
commandGenerate.AddCommand(commandGenerateWireGuardKeyPair)
commandGenerate.AddCommand(commandGenerateRealityKeyPair)
}
var commandGenerateWire... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd.go | package main
import (
"context"
"os"
"os/user"
"strconv"
"time"
_ "github.com/sagernet/sing-box/include"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/service/filemanager"
"github.com/spf13/cobra"
)
var (
globalCtx context.Context
configPaths []string
configDirectories []str... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch.go | package main
import (
"context"
"errors"
"io"
"net"
"net/http"
"net/url"
"os"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common/bufio"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
"github.com/spf13... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set.go | package main
import (
"github.com/spf13/cobra"
)
var commandRuleSet = &cobra.Command{
Use: "rule-set",
Short: "Manage rule-sets",
}
func init() {
mainCommand.AddCommand(commandRuleSet)
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/generate_completions.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/generate_completions.go | //go:build generate && generate_completions
package main
import "github.com/sagernet/sing-box/log"
func main() {
err := generateCompletions()
if err != nil {
log.Fatal(err)
}
}
func generateCompletions() error {
err := mainCommand.GenBashCompletionFile("release/completions/sing-box.bash")
if err != nil {
r... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_match.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_rule_set_match.go | package main
import (
"bytes"
"io"
"os"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/srs"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-box/route"
E "github.com/sagernet/sing/common/... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_lookup.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_lookup.go | package main
import (
"net/netip"
"os"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
N "github.com/sagernet/sing/common/network"
"github.com/spf13/cobra"
)
var commandGeoipLookup = &cobra.Command{
Use: "lookup <address>",
Short: "Lookup if an IP address is contained in ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_list.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_list.go | package main
import (
"os"
"sort"
"github.com/sagernet/sing-box/log"
F "github.com/sagernet/sing/common/format"
"github.com/spf13/cobra"
)
var commandGeositeList = &cobra.Command{
Use: "list <category>",
Short: "List geosite categories",
Run: func(cmd *cobra.Command, args []string) {
err := geositeList(... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_ech.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_ech.go | package main
import (
"os"
"github.com/sagernet/sing-box/common/tls"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
)
var pqSignatureSchemesEnabled bool
var commandGenerateECHKeyPair = &cobra.Command{
Use: "ech-keypair <plain_server_name>",
Short: "Generate TLS ECH key pair",
Args: cobra.Exa... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_list.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geoip_list.go | package main
import (
"os"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
)
var commandGeoipList = &cobra.Command{
Use: "list",
Short: "List geoip country codes",
Run: func(cmd *cobra.Command, args []string) {
err := listGeoip()
if err != nil {
log.Fatal(err)
}
},
}
func init() {
co... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_merge.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_merge.go | package main
import (
"bytes"
"os"
"path/filepath"
"strings"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch_http3.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools_fetch_http3.go | //go:build with_quic
package main
import (
"context"
"crypto/tls"
"net/http"
"github.com/sagernet/quic-go"
"github.com/sagernet/quic-go/http3"
box "github.com/sagernet/sing-box"
"github.com/sagernet/sing/common/bufio"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_tools.go | package main
import (
"github.com/sagernet/sing-box"
E "github.com/sagernet/sing/common/exceptions"
N "github.com/sagernet/sing/common/network"
"github.com/spf13/cobra"
)
var commandToolsFlagOutbound string
var commandTools = &cobra.Command{
Use: "tools",
Short: "Experimental tools",
}
func init() {
comma... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_lookup.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_lookup.go | package main
import (
"os"
"sort"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
"github.com/spf13/cobra"
)
var commandGeositeLookup = &cobra.Command{
Use: "lookup [category] <domain>",
Short: "Check if a domain is in the geosite",
Args: cobra.RangeArgs(1, 2),
Run: fun... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_matcher.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_geosite_matcher.go | package main
import (
"regexp"
"strings"
"github.com/sagernet/sing-box/common/geosite"
)
type searchGeositeMatcher struct {
domainMap map[string]bool
suffixList []string
keywordList []string
regexList []string
}
func newSearchGeositeMatcher(items []geosite.Item) (*searchGeositeMatcher, error) {
options... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/main.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/main.go | //go:build !generate
package main
import "github.com/sagernet/sing-box/log"
func main() {
if err := mainCommand.Execute(); err != nil {
log.Fatal(err)
}
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_tls.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/cmd_generate_tls.go | package main
import (
"os"
"time"
"github.com/sagernet/sing-box/common/tls"
"github.com/sagernet/sing-box/log"
"github.com/spf13/cobra"
)
var flagGenerateTLSKeyPairMonths int
var commandGenerateTLSKeyPair = &cobra.Command{
Use: "tls-keypair <server_name>",
Short: "Generate TLS self sign key pair",
Args: ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/internal/convertor/adguard/convertor_test.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/internal/convertor/adguard/convertor_test.go | package adguard
import (
"strings"
"testing"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/route"
"github.com/stretchr/testify/require"
)
func TestConverter(t *testing.T) {
t.Parallel()
rules, err := Convert(strings.NewReader(`
||example.org^
|example.com^
example.net^
||example.edu
||... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/cmd/sing-box/internal/convertor/adguard/convertor.go | Bcore/windows/resources/sing-box-main/cmd/sing-box/internal/convertor/adguard/convertor.go | package adguard
import (
"bufio"
"io"
"net/netip"
"os"
"strconv"
"strings"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/box_test.go | Bcore/windows/resources/sing-box-main/test/box_test.go | package main
import (
"context"
"crypto/tls"
"io"
"net"
"net/http"
"testing"
"time"
"github.com/sagernet/quic-go"
"github.com/sagernet/quic-go/http3"
"github.com/sagernet/sing-box"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/bufio"
"gi... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/tfo_test.go | Bcore/windows/resources/sing-box-main/test/tfo_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead"
)
func TestTCPSlowOpen(t *testing.T) {
method := shadowaead.List[0]
password := mkBase64(t, 16)
startInstance(t, option.Options{
Inbo... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/tls_test.go | Bcore/windows/resources/sing-box-main/test/tls_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestUTLS(t *testing.T) {
_, certPem, keyPem := createSelfSignedCertificate(t, "example.org")
startInstance(t, option.Options{
Inbounds: []option.Inbound{
{
Type: C.TypeMix... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/wrapper_test.go | Bcore/windows/resources/sing-box-main/test/wrapper_test.go | package main
import (
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/stretchr/testify/require"
)
func TestOptionsWrapper(t *testing.T) {
inbound := option.Inbound{
Type: C.TypeHTTP,
HTTPOptions: option.HTTPMixedInboundOptions{
InboundTLSOptionsConta... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/clash_darwin_test.go | Bcore/windows/resources/sing-box-main/test/clash_darwin_test.go | package main
import (
"errors"
"fmt"
"net"
"net/netip"
"syscall"
"golang.org/x/net/route"
)
func defaultRouteIP() (netip.Addr, error) {
idx, err := defaultRouteInterfaceIndex()
if err != nil {
return netip.Addr{}, err
}
iface, err := net.InterfaceByIndex(idx)
if err != nil {
return netip.Addr{}, err
... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/brutal_test.go | Bcore/windows/resources/sing-box-main/test/brutal_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead_2022"
"github.com/gofrs/uuid/v5"
)
func TestBrutalShadowsocks(t *testing.T) {
method := shadowaead_2022.List[0]
password := mkBase64(t,... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/v2ray_ws_test.go | Bcore/windows/resources/sing-box-main/test/v2ray_ws_test.go | package main
import (
"net/netip"
"os"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/gofrs/uuid/v5"
"github.com/spyzhov/ajson"
"github.com/stretchr/testify/require"
)
func TestV2RayWebsocket(t *testing.T) {
t.Run("self", func(t *testing.T) {
testV2R... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/direct_test.go | Bcore/windows/resources/sing-box-main/test/direct_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
// Since this is a feature one-off added by outsiders, I won't address these anymore.
func _TestProxyProtocol(t *testing.T) {
startInstance(t, option.Options{
Inbounds: []option.Inboun... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/clash_test.go | Bcore/windows/resources/sing-box-main/test/clash_test.go | package main
import (
"context"
"crypto/md5"
"crypto/rand"
"errors"
"io"
"net"
_ "net/http/pprof"
"net/netip"
"sync"
"testing"
"time"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common/control"
F "github.com/sagernet/sing/common/format"
"github.com/docker/docker/api/types"
"github.co... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/shadowtls_test.go | Bcore/windows/resources/sing-box-main/test/shadowtls_test.go | package main
import (
"context"
"net"
"net/http"
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead_2022"
F "github.com/sagernet/sing/common/format"
"github.com/stretchr/testify/require"
)
func TestShadowTL... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/shadowsocks_legacy_test.go | Bcore/windows/resources/sing-box-main/test/shadowsocks_legacy_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks2/shadowstream"
F "github.com/sagernet/sing/common/format"
)
func TestShadowsocksLegacy(t *testing.T) {
testShadowsocksLegacy(t, shadowstream.MethodL... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/inbound_detour_test.go | Bcore/windows/resources/sing-box-main/test/inbound_detour_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead_2022"
)
func TestChainedInbound(t *testing.T) {
method := shadowaead_2022.List[0]
password := mkBase64(t, 16)
startInstance(t, option.Op... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/hysteria_test.go | Bcore/windows/resources/sing-box-main/test/hysteria_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestHysteriaSelf(t *testing.T) {
_, certPem, keyPem := createSelfSignedCertificate(t, "example.org")
startInstance(t, option.Options{
Inbounds: []option.Inbound{
{
Type: C... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/wireguard_test.go | Bcore/windows/resources/sing-box-main/test/wireguard_test.go | package main
import (
"net/netip"
"testing"
"time"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func _TestWireGuard(t *testing.T) {
startDockerContainer(t, DockerOptions{
Image: ImageBoringTun,
Cap: []string{"MKNOD", "NET_ADMIN", "NET_RAW"},
Ports: []uint16{serverPo... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/hysteria2_test.go | Bcore/windows/resources/sing-box-main/test/hysteria2_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-quic/hysteria2"
)
func TestHysteria2Self(t *testing.T) {
t.Run("self", func(t *testing.T) {
testHysteria2Self(t, "")
})
t.Run("self-salamander", func(t *test... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/trojan_test.go | Bcore/windows/resources/sing-box-main/test/trojan_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestTrojanOutbound(t *testing.T) {
_, certPem, keyPem := createSelfSignedCertificate(t, "example.org")
startDockerContainer(t, DockerOptions{
Image: ImageTrojan,
Ports: []uint1... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/v2ray_httpupgrade_test.go | Bcore/windows/resources/sing-box-main/test/v2ray_httpupgrade_test.go | package main
import (
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestV2RayHTTPUpgrade(t *testing.T) {
t.Run("self", func(t *testing.T) {
testV2RayTransportSelf(t, &option.V2RayTransportOptions{
Type: C.V2RayTransportTypeHTTPUpgrade,
})
})
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/mux_test.go | Bcore/windows/resources/sing-box-main/test/mux_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead_2022"
"github.com/gofrs/uuid/v5"
)
var muxProtocols = []string{
"h2mux",
"smux",
"yamux",
}
func TestVMessSMux(t *testing.T) {
testV... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/vmess_test.go | Bcore/windows/resources/sing-box-main/test/vmess_test.go | package main
import (
"net/netip"
"os"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/gofrs/uuid/v5"
"github.com/spyzhov/ajson"
"github.com/stretchr/testify/require"
)
func newUUID() uuid.UUID {
user, _ := uuid.DefaultGenerator.NewV4()
return user
}
... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/mkcert.go | Bcore/windows/resources/sing-box-main/test/mkcert.go | package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/pem"
"math/big"
"os"
"path/filepath"
"testing"
"time"
"github.com/sagernet/sing/common/rw"
"github.com/stretchr/testify/require"
)
func createSelfSignedCertificate(t *testing.T, do... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/domain_inbound_test.go | Bcore/windows/resources/sing-box-main/test/domain_inbound_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
dns "github.com/sagernet/sing-dns"
"github.com/gofrs/uuid/v5"
)
func TestTUICDomainUDP(t *testing.T) {
_, certPem, keyPem := createSelfSignedCertificate(t, "example.org")
startInstance... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/ss_plugin_test.go | Bcore/windows/resources/sing-box-main/test/ss_plugin_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestShadowsocksObfs(t *testing.T) {
for _, mode := range []string{
"http", "tls",
} {
t.Run("obfs-local "+mode, func(t *testing.T) {
testShadowsocksPlugin(t, "obfs-local", "... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/http_test.go | Bcore/windows/resources/sing-box-main/test/http_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
)
func TestHTTPSelf(t *testing.T) {
startInstance(t, option.Options{
Inbounds: []option.Inbound{
{
Type: C.TypeMixed,
Tag: "mixed-in",
MixedOptions: option.HTTPMixedInbou... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/tuic_test.go | Bcore/windows/resources/sing-box-main/test/tuic_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/gofrs/uuid/v5"
)
func TestTUICSelf(t *testing.T) {
t.Run("self", func(t *testing.T) {
testTUICSelf(t, false, false)
})
t.Run("self-udp-stream", func(t *testing.T) {
tes... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/v2ray_transport_test.go | Bcore/windows/resources/sing-box-main/test/v2ray_transport_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/gofrs/uuid/v5"
"github.com/stretchr/testify/require"
)
func TestV2RayHTTPSelf(t *testing.T) {
testV2RayTransportSelf(t, &option.V2RayTransportOptions{
Type: C.V2RayTranspo... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/clash_other_test.go | Bcore/windows/resources/sing-box-main/test/clash_other_test.go | //go:build !darwin
package main
import (
"errors"
"net/netip"
)
func defaultRouteIP() (netip.Addr, error) {
return netip.Addr{}, errors.New("not supported")
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/naive_test.go | Bcore/windows/resources/sing-box-main/test/naive_test.go | package main
import (
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/auth"
"github.com/sagernet/sing/common/network"
)
func TestNaiveInboundWithNginx(t *testing.T) {
caPem, certPem, keyPem := createSelfSignedCertificate(t,... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/ech_test.go | Bcore/windows/resources/sing-box-main/test/ech_test.go | package main
import (
"net/netip"
"testing"
"github.com/sagernet/sing-box/common/tls"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
"github.com/gofrs/uuid/v5"
)
func TestECH(t *testing.T) {
_, certPem, keyPem := createSelfSignedCertificate(... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/docker_test.go | Bcore/windows/resources/sing-box-main/test/docker_test.go | package main
import (
"context"
"os"
"path/filepath"
"testing"
"time"
"github.com/sagernet/sing/common/debug"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/rw"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/shadowsocks_test.go | Bcore/windows/resources/sing-box-main/test/shadowsocks_test.go | package main
import (
"crypto/rand"
"encoding/base64"
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-shadowsocks/shadowaead_2022"
F "github.com/sagernet/sing/common/format"
"github.com/stretchr/testify/require"
)
const (
serv... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/v2ray_api_test.go | Bcore/windows/resources/sing-box-main/test/v2ray_api_test.go | package main
import (
"context"
"net/netip"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/experimental/v2rayapi"
"github.com/sagernet/sing-box/option"
"github.com/stretchr/testify/require"
)
func TestV2RayAPI(t *testing.T) {
i := startInstance(t, option.Options{
Inbound... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/mux_cool_test.go | Bcore/windows/resources/sing-box-main/test/mux_cool_test.go | package main
import (
"net/netip"
"os"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/spyzhov/ajson"
"github.com/stretchr/testify/require"
)
func TestMuxCoolServer(t *testing.T) {
userId := newUUID()
content, err := os.ReadFile("config/vmess-mux-client... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/test/v2ray_grpc_test.go | Bcore/windows/resources/sing-box-main/test/v2ray_grpc_test.go | package main
import (
"net/netip"
"os"
"testing"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option"
"github.com/gofrs/uuid/v5"
"github.com/spyzhov/ajson"
"github.com/stretchr/testify/require"
)
func TestV2RayGRPCInbound(t *testing.T) {
t.Run("origin", func(t *testing.T) {
tes... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/experimental.go | Bcore/windows/resources/sing-box-main/option/experimental.go | package option
type ExperimentalOptions struct {
CacheFile *CacheFileOptions `json:"cache_file,omitempty"`
ClashAPI *ClashAPIOptions `json:"clash_api,omitempty"`
V2RayAPI *V2RayAPIOptions `json:"v2ray_api,omitempty"`
Debug *DebugOptions `json:"debug,omitempty"`
}
type CacheFileOptions struct {
Enable... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/json.go | Bcore/windows/resources/sing-box-main/option/json.go | package option
import (
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
"github.com/sagernet/sing/common/json/badjson"
)
func ToMap(v any) (*badjson.JSONObject, error) {
inputContent, err := json.Marshal(v)
if err != nil {
return nil, err... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/hysteria.go | Bcore/windows/resources/sing-box-main/option/hysteria.go | package option
type HysteriaInboundOptions struct {
ListenOptions
Up string `json:"up,omitempty"`
UpMbps int `json:"up_mbps,omitempty"`
Down string `json:"down,omitempty"`
DownMbps int `json:"down_mbps,omitempty"`
Obfs ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/tls_acme.go | Bcore/windows/resources/sing-box-main/option/tls_acme.go | package option
import (
C "github.com/sagernet/sing-box/constant"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
)
type InboundACMEOptions struct {
Domain Listable[string] `json:"domain,omitempty"`
DataDirectory string ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/udp_over_tcp.go | Bcore/windows/resources/sing-box-main/option/udp_over_tcp.go | package option
import (
"github.com/sagernet/sing/common/json"
"github.com/sagernet/sing/common/uot"
)
type _UDPOverTCPOptions struct {
Enabled bool `json:"enabled,omitempty"`
Version uint8 `json:"version,omitempty"`
}
type UDPOverTCPOptions _UDPOverTCPOptions
func (o UDPOverTCPOptions) MarshalJSON() ([]byte, ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/inbound.go | Bcore/windows/resources/sing-box-main/option/inbound.go | package option
import (
"time"
C "github.com/sagernet/sing-box/constant"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
)
type _Inbound struct {
Type string `json:"type"`
Tag string `json:"tag,omitempty"`
... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/time_unit.go | Bcore/windows/resources/sing-box-main/option/time_unit.go | package option
import (
"errors"
"time"
)
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
const durationDay = 24 * time.Hour
var unitMap = map[string]uint64{
"ns": uint64(time.Nanosecond),
"us": uint64... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/ntp.go | Bcore/windows/resources/sing-box-main/option/ntp.go | package option
type NTPOptions struct {
Enabled bool `json:"enabled,omitempty"`
Interval Duration `json:"interval,omitempty"`
WriteToSystem bool `json:"write_to_system,omitempty"`
ServerOptions
DialerOptions
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/rule_set.go | Bcore/windows/resources/sing-box-main/option/rule_set.go | package option
import (
"reflect"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/domain"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/json"
"go4.org/netipx"
)
type _Rul... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/vmess.go | Bcore/windows/resources/sing-box-main/option/vmess.go | package option
type VMessInboundOptions struct {
ListenOptions
Users []VMessUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type VMessUser struct {
Name string `json:"nam... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/multiplex.go | Bcore/windows/resources/sing-box-main/option/multiplex.go | package option
type InboundMultiplexOptions struct {
Enabled bool `json:"enabled,omitempty"`
Padding bool `json:"padding,omitempty"`
Brutal *BrutalOptions `json:"brutal,omitempty"`
}
type OutboundMultiplexOptions struct {
Enabled bool `json:"enabled,omitempty"`
Protocol ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/shadowsocks.go | Bcore/windows/resources/sing-box-main/option/shadowsocks.go | package option
type ShadowsocksInboundOptions struct {
ListenOptions
Network NetworkList `json:"network,omitempty"`
Method string `json:"method"`
Password string `json:"password,omitempty"`
Users []ShadowsocksUser `json:"users,omitempty... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/group.go | Bcore/windows/resources/sing-box-main/option/group.go | package option
type SelectorOutboundOptions struct {
Outbounds []string `json:"outbounds"`
Default string `json:"default,omitempty"`
InterruptExistConnections bool `json:"interrupt_exist_connections,omitempty"`
}
type URLTestOutboundOptions struct {
Outbounds ... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/types.go | Bcore/windows/resources/sing-box-main/option/types.go | package option
import (
"net/http"
"net/netip"
"strings"
"time"
"github.com/sagernet/sing-dns"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/json"
N "github.com/sagernet/sing/common/network"
mDNS "github.com/miekg/dns"
)
type Lis... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/v2ray_transport.go | Bcore/windows/resources/sing-box-main/option/v2ray_transport.go | package option
import (
C "github.com/sagernet/sing-box/constant"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/json"
)
type _V2RayTransportOptions struct {
Type string `json:"type"`
HTTPOptions V2RayHTTPOptions `json:"-"`
WebsocketO... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/tun_platform.go | Bcore/windows/resources/sing-box-main/option/tun_platform.go | package option
type TunPlatformOptions struct {
HTTPProxy *HTTPProxyOptions `json:"http_proxy,omitempty"`
}
type HTTPProxyOptions struct {
Enabled bool `json:"enabled,omitempty"`
ServerOptions
BypassDomain Listable[string] `json:"bypass_domain,omitempty"`
MatchDomain Listable[string] `json:"match_domain,omitemp... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/config.go | Bcore/windows/resources/sing-box-main/option/config.go | package option
import (
"bytes"
"github.com/sagernet/sing/common/json"
)
type _Options struct {
RawMessage json.RawMessage `json:"-"`
Schema string `json:"$schema,omitempty"`
Log *LogOptions `json:"log,omitempty"`
DNS *DNSOptions `json:"dns,omitemp... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/ssh.go | Bcore/windows/resources/sing-box-main/option/ssh.go | package option
type SSHOutboundOptions struct {
DialerOptions
ServerOptions
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
PrivateKey Listable[string] `json:"private_key,omitempty"`
PrivateKeyPath string `j... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/vless.go | Bcore/windows/resources/sing-box-main/option/vless.go | package option
type VLESSInboundOptions struct {
ListenOptions
Users []VLESSUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type VLESSUser struct {
Name string `json:"name"`... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/naive.go | Bcore/windows/resources/sing-box-main/option/naive.go | package option
import "github.com/sagernet/sing/common/auth"
type NaiveInboundOptions struct {
ListenOptions
Users []auth.User `json:"users,omitempty"`
Network NetworkList `json:"network,omitempty"`
InboundTLSOptionsContainer
}
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/v2ray.go | Bcore/windows/resources/sing-box-main/option/v2ray.go | package option
| go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Begzar/BegzarWindows | https://github.com/Begzar/BegzarWindows/blob/8c374326e7569db68ccfb9e0b5c2daa124d44545/Bcore/windows/resources/sing-box-main/option/dns.go | Bcore/windows/resources/sing-box-main/option/dns.go | package option
import "net/netip"
type DNSOptions struct {
Servers []DNSServerOptions `json:"servers,omitempty"`
Rules []DNSRule `json:"rules,omitempty"`
Final string `json:"final,omitempty"`
ReverseMapping bool `json:"reverse_mapping,omitempty"`
FakeIP... | go | MIT | 8c374326e7569db68ccfb9e0b5c2daa124d44545 | 2026-01-07T09:45:34.255374Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.