Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/upstream-waivers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ fa79e3b565d6d482aca2a3f44ed2cd4275905b44 rejected: upstream PR #61 (branch pr-61
fbb0110881cb03804dded5b7778b78dbb67da72d rejected: upstream merge of origin/dev into feat/mtproto-telemt on the open, not merged PR #61 branch pr-61, whose conflict resolution carries changes of its own; PR #61 adds a telemt MTProto backend, the Telegram proxy, and the owner ordered the Telegram proxy out of the fork on 2026-11-10 (641d19c1) and confirmed on 2026-12-02 that it stays out; on the wire it would also take BackendType MTPROTO = 2, reserved by number and by name in the fork since it removed SING_BOX; if upstream merges it, review it only for changes outside the MTProto backend branch:pr-61
7be885ff5410ac7fdb92fa21cf7901a416be5f05 superseded: upstream #86 makes xray Core.Started() take c.mu; the fork closed the same race lock-free in cc27180 (Started reads an atomic coreState snapshot, liveness from waitDone), because c.mu in Started puts every REST/gRPC request behind Stop's kill and 5 s wait (docs/upstream-parity.md); upstream's TestCoreStarted tests and their -race CI step are carried in backend/xray/core_started_test.go
d359a8f7c478044c0fb80afcda207c6d122affd5 not-applicable: upstream #117 only makes StartOrAttach restart an unhealthy backend instead of treating a same-config Start as a heartbeat; the fork does not carry StartOrAttach (see ca24af0b, rejected) and every fork Start runs ReplaceBackend (controller/rpc/base.go), so an unhealthy backend is always restarted
47857d43fe777f30f9ecc5f2ffe4ca0b037507cb not-applicable: upstream v0.5.5 release commit, whose only change sets controller.NodeVersion to 0.5.5; the fork versions its node on its own line (NodeVersion 0.6.29, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.5 change is tracked here commit by commit
47857d43fe777f30f9ecc5f2ffe4ca0b037507cb not-applicable: upstream v0.5.5 release commit, whose only change sets controller.NodeVersion to 0.5.5; the fork versions its node on its own line (NodeVersion 0.6.30, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.5 change is tracked here commit by commit
88d5e75db62190d8566caf826536c801465c1482 superseded: upstream #96 (released in node v0.5.6, 675bdaa) is ported from the node v0.5.7 (739eab94) end state by the fork commit "feat(xray): masque inbound on proto field 12": message Masque { string pass = 1; } byte-identical, MasqueAccount/NewMasqueAccount (empty pass skips the user), the masque inbound cases in config.go, user.go and config_clone.go, and the masque_test.go and api/masque_test.go tests; the Proxy field is masque = 12, not 7, because the fork Proxy already uses 7 for Hysteria2 and 8 to 11 for OpenVPN, the reserved MTProto slot, TUIC and L2TP (common/masque_wire_test.go pins the wire tag 0x62); built on xray-core 676eaf66f8f0
243b818307790393d21b41154c99b0d052e89a59 superseded: pre-squash commit (feat: add Masque proxy support) of upstream PR #96 on branch masque, squash-merged as 88d5e75 (released in node v0.5.6, 675bdaa), which the fork ports from the node v0.5.7 end state in its commit feat(xray): masque inbound on proto field 12, with masque = 12 instead of 7 (see the 88d5e75 row) branch:masque
f0877ce629e84aae6099e9bf5c6f47837dff78a8 superseded: pre-squash commit (feat(xray): upgrade to v26.9.30 prerelease and use native MASQUE accounts) of upstream PR #96 on branch masque, squash-merged as 88d5e75; the node agent compiles against its go.mod pin xray-core 676eaf66f8f0 (the v26.11.9 release tag commit), which carries the native MASQUE accounts, while the image's xray binary is held on v26.3.27 (d2758a023cd7), which has no proxy/masque, and ports the #96 end state in feat(xray): masque inbound on proto field 12 (see the 88d5e75 row) branch:masque
b7442879ef0f67b692474e0e668d65f29df8de49 superseded: merge of dev into branch masque (parents f0877ce and 3a3d5c5) inside upstream PR #96, squash-merged as 88d5e75; it brings no content beyond dev and the masque commits, which are tracked on their own rows and through 88d5e75 branch:masque
675bdaa24a3a67847f2094e518f1ae4d8460aa01 not-applicable: upstream v0.5.6 release commit, whose only change sets controller.NodeVersion to 0.5.6; the fork versions its node on its own line (NodeVersion 0.6.29, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.6 change is tracked here commit by commit
739eab94a9343d9f0035baf7162796844109f4c4 not-applicable: upstream v0.5.7 release commit, whose only change sets controller.NodeVersion to 0.5.7; the fork versions its node on its own line (NodeVersion 0.6.29, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.7 change is tracked here commit by commit
675bdaa24a3a67847f2094e518f1ae4d8460aa01 not-applicable: upstream v0.5.6 release commit, whose only change sets controller.NodeVersion to 0.5.6; the fork versions its node on its own line (NodeVersion 0.6.30, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.6 change is tracked here commit by commit
739eab94a9343d9f0035baf7162796844109f4c4 not-applicable: upstream v0.5.7 release commit, whose only change sets controller.NodeVersion to 0.5.7; the fork versions its node on its own line (NodeVersion 0.6.30, pinned by TestNodeVersionIsPinned) and must not report an upstream version, and every v0.5.7 change is tracked here commit by commit
ebb0d02944bdf4f7166819d31466a224f0daf7e2 superseded: upstream commit of 2026-11-02, released in node v0.5.7 (739eab9, 2026-11-03), for the Ubuntu 26.04 AppArmor wg profile that makes wg set ... private-key fail with fopen: Permission denied on a key file under /tmp in the WireGuard E2E tests; the fork fixed the same failure on 2026-10-29 in b8679894 (on main), which writes the E2E client key with os.CreateTemp under /etc/wireguard, the one key path that profile allows, and with it TestIntegrationE2ESyncUser, TestIntegrationE2ESyncUsers and TestIntegrationE2EUpdateUsers pass on ubuntu-latest (wireguard-integration job 123832855477 on b8679894, no Permission denied in its log); upstream's key-file half is the same change, its chmod 0600 is already the os.CreateTemp mode, and its fallback to the default temp dir would hit the same denial; its other half, unloading the wg and wg-quick AppArmor profiles with apparmor_parser -R and aa-disable from TestMain and from the install_wg Makefile target, is not taken: it weakens the host's AppArmor confinement from a test binary and a package installer, and the fork's fix needs none of it
36dc7a4a78a075d20ed6c82297c8097fd2a6462f not-applicable: removes the .gitlab-ci.yml that upstream #64 (e03754d) added for the contributor's own GitLab pipeline; the fork ported #64 on 2026-11-10 in c755202a without that file, and no commit on main has ever added a .gitlab-ci.yml (git log origin/main -- .gitlab-ci.yml is empty on 2026-11-11), so there is nothing to delete
689f2665e2157c93d1ee65cb6426d4684a53056a pending: dev-only: upstream #120 adds a telemt MTProto backend, the Telegram proxy, in no upstream tag yet (newest tag v0.5.7, 739eab9, checked 2026-12-02); the owner ordered the Telegram proxy out of the fork on 2026-11-10 (641d19c1) and confirmed on 2026-12-02 that it stays out, so the backend itself is never ported, and on the wire it would also take BackendType 2 and Proxy 8, which the fork keeps reserved and uses for open_vpn; the same commit adds a generic retry-later sync error (backend/errors.go RetryLaterError, answered as HTTP 503 by controller/rest/sync_errors.go and as gRPC Unavailable by controller/rpc/sync_errors.go), which is ported or refused on its own once a release contains it until:2026-12-31
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ RUN git init -q . \
&& grep -qF "link.Writer = speedcap.NewWriter(ctx, user.Email, sessionInbound.Tag, speedcap.Downlink, link.Writer)" app/dispatcher/default.go \
&& grep -qF "var splice = inbound.CanSpliceCopy == 1 && !speedcap.CappedUser(inbound.User, inbound.Tag)" proxy/proxy.go \
&& grep -qF "w, capped, err := spliceUntilCapped(tc, readerConn, inbound)" proxy/proxy.go \
&& grep -qF "downlinkReader.CountDelivered(c)" app/dispatcher/default.go \
&& ! grep -qF "Writer: outboundLink.Writer," app/dispatcher/default.go \
&& grep -qF "CountWritten: true," app/dispatcher/default.go \
&& grep -qF "CountWritten bool" app/dispatcher/stats.go \
&& grep -qF "func (r *Reader) CountDelivered(counter DeliveryCounter) {" transport/pipe/delivery.go \
&& test "$(grep -c 'r.delivery.settle()' transport/pipe/reader.go)" = "2" \
&& test "$(grep -c 'r.delivery.hold(mb)' transport/pipe/reader.go)" = "2" \
&& grep -qF "delivered.SettleDelivered()" proxy/http/server.go \
&& grep -qF "ok && relayed {" proxy/http/server.go \
&& git apply --verbose /patches/xray-pinned-ca-servername.patch \
&& grep -qF 'return errors.New("Pinning CA needs a valid ServerName")' transport/internet/tls/config.go \
&& grep -qF "config := tlsConfig.GetTLSConfig(tls.WithDestination(dest))" transport/internet/grpc/dial.go \
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ test_xray_patches:
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -run 'TestEarlyDataConnAddressesBeforeFirstWrite' ./transport/internet/websocket/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=3 -timeout 300s -run 'TestCloseWithPacketInFlightDoesNotPanic|TestProcessAfterCloseDoesNotPanic|TestProcessWhileClosingDoesNotRaceOrPanic|TestAClosedHandlerNeverBuildsANewTunnel|TestProcessTCPWhileClosingDoesNotRaceOrPanic|TestADialAfterCloseUsesTheTunnelProcessTookUnderTheLock|TestClosingABindTwiceDoesNotPanic' ./proxy/wireguard/ ./proxy/wireguard/gvisortun/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -timeout 600s ./app/proxyman/speedcap/...
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -run 'TestWrapLinkCapsTheUserAndKeepsTheStatsWriterOutermost' ./app/dispatcher/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -timeout 900s -run 'TestSpeedCap' ./testing/scenarios/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -run 'TestWrapLinkCapsTheUserAndKeepsTheStatsWriterOutermost|TestADispatchedDownlinkCountsOnlyWhatTheInboundCameBackForMoreAfter|TestALinkedDownlinkCountsOnlyWhatTheClientWriterTook' ./app/dispatcher/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=3 ./transport/pipe/
cd "$(XRAY_SRC)" && CGO_ENABLED=1 GOTOOLCHAIN=local $(GO_TEST_VISIBLE) -race -count=1 -timeout 900s -run 'TestSpeedCap|TestUserDownlinkCounts' ./testing/scenarios/

install_wg: update_os
ifeq ($(UNAME_S),Linux)
Expand Down
4 changes: 2 additions & 2 deletions controller/base_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestBaseInfoResponseWithoutDegradation(t *testing.T) {
}

func TestNodeVersionIsPinned(t *testing.T) {
if NodeVersion != "0.6.29" {
t.Fatalf("NodeVersion = %q, want %q", NodeVersion, "0.6.29")
if NodeVersion != "0.6.30" {
t.Fatalf("NodeVersion = %q, want %q", NodeVersion, "0.6.30")
}
}
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/pasarguard/node/pkg/sysstats"
)

const NodeVersion = "0.6.29"
const NodeVersion = "0.6.30"

const keepAliveGrace = 5 * time.Second

Expand Down
5 changes: 4 additions & 1 deletion docs/upstream-parity.md
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,10 @@ shipped.
- hunks for code that does not exist at the pin are left out: the `trackOnlineIP` helper, TUN inbound stats, and the
restructured WireGuard client and server;
- the pin names the online map field `onlineMap`, not `onlineMaps`;
- the interface keeps the pin's doc comment for `UnregisterOnlineMap`.
- the interface keeps the pin's doc comment for `UnregisterOnlineMap`;
- the context of its dispatcher hunks is the speed cap patch's code, which attaches the user downlink counter to
the downlink pipe reader in `getLink` and counts `WrapLink`'s downlink after the write; its own changed lines are
the same.
- **Test:** `TestPerUserStatsCountEveryByteOnceUnderConcurrentFirstTrafficAndReset` starts 16 connections per user at
once through `dispatcher.WrapLink`, with a `QueryStats` reset poller running throughout. It checks that every byte is
counted exactly once and that every IP reaches the online map, over 200 rounds under `-race`.
Expand Down
Loading