Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1a450e3
Add multi-secret support and per-user stats API
dolonet Mar 29, 2026
7ccdeff
Update fork build config and add upstream sync
dolonet Mar 29, 2026
659c478
Merge remote-tracking branch 'upstream/master'
dolonet Mar 29, 2026
319a413
Merge remote-tracking branch 'upstream/master'
dolonet Mar 29, 2026
046adb3
Rewrite README: fork features first, bilingual, drop legacy sections
dolonet Mar 29, 2026
abad905
Merge pull request #2 from dolonet/readme-rewrite
dolonet Mar 30, 2026
930c992
Fix CI: benchmark lint exclusions and data race in doppel test
dolonet Mar 30, 2026
667d926
Fix golangci config: use v2 linters.exclusions.rules syntax
dolonet Mar 30, 2026
fd3670a
Merge pull request #3 from dolonet/fix/benchmark-lint-and-race
dolonet Mar 30, 2026
9399bd5
Merge upstream/master: idiomatic Go, IP priority, flaky test fixes
dolonet Mar 31, 2026
b230a2e
fix: change module path to github.com/dolonet/mtg-multi
dolonet Mar 31, 2026
9c62a60
Merge pull request #5 from dolonet/sync-upstream-and-fix-module-path
dolonet Mar 31, 2026
a853edc
fix: move [secrets] after global keys in config examples
dolonet Apr 1, 2026
aec151d
Merge remote-tracking branch 'upstream/master' into fix/toml-section-…
dolonet Apr 1, 2026
d6c1fe2
Merge remote-tracking branch 'origin/master' into fix/toml-section-order
dolonet Apr 1, 2026
ab39fbb
Merge pull request #8 from dolonet/fix/toml-section-order
dolonet Apr 1, 2026
5dc9ba3
Add per-user connection throttling with fair-share algorithm
dolonet Apr 1, 2026
fbe42f3
Merge pull request #9 from dolonet/feature/connection-throttle
dolonet Apr 1, 2026
1ad10cd
Add throttling docs to README
dolonet Apr 1, 2026
33a5cd3
Merge upstream: refactor TLS fragmentation (9seconds/mtg#433)
dolonet Apr 1, 2026
94e88d8
Merge pull request #10 from dolonet/docs/throttle-readme
dolonet Apr 1, 2026
5c607bb
Merge pull request #11 from dolonet/sync-upstream-tls-refactor
dolonet Apr 1, 2026
5c5741d
Merge remote-tracking branch 'upstream/master' into sync-upstream-gor…
dolonet Apr 1, 2026
d7f2f02
Merge pull request #12 from dolonet/sync-upstream-goreleaser
dolonet Apr 1, 2026
e13f236
Improve TCP keepalive and idle timeout for mobile clients
dolonet Apr 6, 2026
fa56c59
Merge pull request #14 from dolonet/sync-upstream-keepalive
dolonet Apr 6, 2026
65ca2c4
Merge upstream/master (sync history after cherry-pick of #441)
dolonet Apr 6, 2026
952fe3b
Fix: restore "time" import needed by throttle feature
dolonet Apr 6, 2026
ca905f0
Merge pull request #15 from dolonet/sync-upstream-history
dolonet Apr 6, 2026
e84b6ba
Merge upstream: handshake timeout, GREASE cipher fix, no-default-TLS-…
dolonet Apr 7, 2026
bd5ad0a
Merge pull request #16 from dolonet/sync-upstream-handshake-grease
dolonet Apr 7, 2026
9d24f92
Propagate keep alive settings from the config
9seconds Apr 7, 2026
a7edff4
Use TCP BBR in a best-effort mode
9seconds Apr 7, 2026
fcef1d5
Add TCP_USER_TIMEOUT support
9seconds Apr 7, 2026
21b51d5
Add TCP_NOTSENT_LOWAT setting
9seconds Apr 7, 2026
76a18f4
Refactor socksopts per functionality, not per build flag
9seconds Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

fixes:
- "github.com/9seconds/mtg/v2/::"
- "github.com/dolonet/mtg-multi/::"
94 changes: 0 additions & 94 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,97 +118,3 @@ jobs:

- name: Run linter
run: mise tasks run lint

artifacts:
name: Build release artifacts
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive

- uses: jdx/mise-action@v3
name: Install mise

- name: Cache Go modules
uses: actions/cache@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gomod-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-gomod-

- name: Cache cross-compilation build
uses: actions/cache@v5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-goreleaser-${{ hashFiles('go.sum') }}-${{ hashFiles('**/*.go') }}
restore-keys: |
${{ runner.os }}-goreleaser-${{ hashFiles('go.sum') }}-
${{ runner.os }}-goreleaser-

- name: Run release
run: mise tasks run release

docker:
name: Docker
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive

- name: Get Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
nineseconds/mtg
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=master,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=stable,enable=${{ github.ref == 'refs/heads/stable' }}

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup BuildX
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
pull: true
context: .
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags:
- v*

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: "1.26"

- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56 changes: 56 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Sync with upstream

on:
schedule:
- cron: "0 8 1 * *"
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Add upstream remote
run: git remote add upstream https://github.com/9seconds/mtg.git

- name: Fetch upstream
run: git fetch upstream

- name: Check for new commits
id: check
run: |
COUNT=$(git rev-list --count HEAD..upstream/master)
echo "count=$COUNT" >> "$GITHUB_OUTPUT"
echo "Upstream is $COUNT commits ahead"

- name: Merge upstream
if: steps.check.outputs.count != '0'
id: merge
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git merge upstream/master --no-edit
continue-on-error: true

- name: Push if merge succeeded
if: steps.check.outputs.count != '0' && steps.merge.outcome == 'success'
run: git push origin master

- name: Create issue on conflict
if: steps.merge.outcome == 'failure'
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Upstream sync failed — merge conflict',
body: 'Automatic merge from `9seconds/mtg:master` failed due to conflicts.\n\nResolve manually:\n```\ngit fetch upstream\ngit merge upstream/master\n# fix conflicts\ngit push origin master\n```',
labels: ['sync']
});
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
mtg
coverage.txt
dist/
mtg-multi
mtg-multi-*
9 changes: 9 additions & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ tests = true
# "thelper",
# "varnamelen",
# ]

# Benchmark and tool code: unchecked Close/Write/Fprintf is fine.
[[linters.exclusions.rules]]
path = 'benchmarks/'
linters = ['errcheck', 'ineffassign']

[[linters.exclusions.rules]]
path = '_bench_test\.go$'
linters = ['errcheck', 'ineffassign']
113 changes: 4 additions & 109 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

version: 2

project_name: mtg
project_name: mtg-multi

before:
hooks:
Expand All @@ -11,86 +11,13 @@ before:

builds:
- id: default
binary: '{{ .ProjectName }}'
goos:
- darwin
- freebsd
- linux
- netbsd
- openbsd
- windows
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
- 7
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -mod=readonly
ldflags: -s -w -X main.version={{ .Version }}
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: freebsd
goarch: arm64
- goos: netbsd
goarch: arm64
- goos: openbsd
goarch: arm64
- goos: windows
goarch: 386
- goos: windows
goarch: arm
- id: mips
binary: '{{ .ProjectName }}'
binary: mtg-multi
goos:
- linux
goarch:
- mips
- mipsle
gomips:
- softfloat
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -mod=readonly
ldflags: -s -w -X main.version={{ .Version }}
- id: arm64-v9
binary: '{{ .ProjectName }}'
goos:
- darwin
- linux
goarch:
- arm64
goarm64:
- v9.0
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -mod=readonly
ldflags: -s -w -X main.version={{ .Version }}
- id: amd64-v3
binary: '{{ .ProjectName }}'
goos:
- darwin
- freebsd
- linux
- netbsd
- openbsd
- windows
goarch:
- amd64
goamd64:
- v3
- arm64
env:
- CGO_ENABLED=0
flags:
Expand All @@ -102,49 +29,17 @@ archives:
- id: default
ids:
- default
- mips
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}'
formats:
- tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
formats:
- zip
files:
- LICENSE
- README.md
- SECURITY.md
- BEST_PRACTICES.md
- example.config.toml
- id: optimized
ids:
- arm64-v9
- amd64-v3
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm64 }}-{{ .Arm64 }}{{ end }}{{ if .Amd64 }}-{{ .Amd64 }}{{ end }}'
formats:
- tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
formats:
- zip
files:
- LICENSE
- README.md
- SECURITY.md
- BEST_PRACTICES.md
- example.config.toml

gomod:
proxy: true

snapshot:
version_template: '{{ .Version }}'

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'

source:
enabled: true
name_template: '{{ .ProjectName }}-sources'
Loading
Loading