Skip to content

swgp-go: add at 1.10.0#29889

Open
flokli wants to merge 1 commit into
openwrt:masterfrom
flokli:swgp-go
Open

swgp-go: add at 1.10.0#29889
flokli wants to merge 1 commit into
openwrt:masterfrom
flokli:swgp-go

Conversation

@flokli

@flokli flokli commented Jul 1, 2026

Copy link
Copy Markdown

Compiled on x86_64-linux, successfully tested on mediatek/filogic, 25.12.5.

📦 Package Details

Maintainer: @flokli (me)

Description:
This acts as a proxy for wireguard connections, providing some levels of obfuscation on top.


🧪 Run Testing Details

  • OpenWrt Version: 25.12.5
  • OpenWrt Target/Subtarget: mediatek/filogik
  • OpenWrt Device: glinet_gl-mt6000

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@BKPepe BKPepe added the AI It looks like this is issue or pull request was created by AI or it includes AI comments label Jul 2, 2026
Comment thread net/swgp-go/Makefile Outdated
Comment thread net/swgp-go/README.md
Comment on lines +1 to +20
# swgp-go
This readme should help you configure swgp-go.

## Configuration
Edit `/etc/swgp.json` with your desired configuration (Client, Server or both).

If you're configuring a server, also properly allow that port in your firewall.

Note the pprof feature is disabled in this package. If you try to enable it
regardless, `swgp-go` will show an error on startup.

## Start daemon
Once you have created your config, enable and run swgp-go using its init script:

```
/etc/init.d/swgp-go enable
/etc/init.d/swpg-go start
```

Please refer to the [Project README](https://github.com/database64128/swgp-go) for more configuration info and examples.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this readme? :-) How to start daemon it is quite obvious how OpenWrt works.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream doesn't have a canonical config file location, and as it requires some configuration on startup I wanted to write it down somewhere. And I saw some other packages also putting readme files like this in there. Is there a better location to put it, or you want me to remove it alltogether?

@flokli flokli requested a review from BKPepe July 2, 2026 10:42
@flokli flokli force-pushed the swgp-go branch 2 times, most recently from 40b7487 to a7179b8 Compare July 2, 2026 22:18
@flokli

flokli commented Jul 2, 2026

Copy link
Copy Markdown
Author

Rebased and added a test.sh script.

@flokli

flokli commented Jul 6, 2026

Copy link
Copy Markdown
Author

I got a notification from CI about a failing build just now, but this seems unrelated:

  2026-07-06 08:33:33 URL:https://mirror-03.infra.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-14.4.0_musl.Linux-x86_64.tar.zst [295175287/295175287] -> "openwrt-sdk-x86-64_gcc-14.4.0_musl.Linux-x86_64.tar.zst" [3]
  f03b79d8befd19863d4f05f8451d52a607222b7583ee8d3b901c6f34190a6fe1 *openwrt-sdk-x86-64_gcc-14.4.0_musl.Linux-x86_64.tar.zst
  sha256sum: WARNING: 1 computed checksum did NOT match
  openwrt-sdk-x86-64_gcc-14.4.0_musl.Linux-x86_64.tar.zst: FAILED

@BKPepe anything left from my side here?

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review of the new net/swgp-go package. Main items: two documentation errors in the README that would misdirect users (wrong config path and a swpg-go typo in the start command), plus a couple of minor Makefile/init nits. CI is still pending, so no build results to comment on.

Commit checks

Reviewed 1 new commit; message ("swgp-go: add at 1.10.0") matches the diff (new package addition), Signed-off-by present. No issues found.


Generated by Claude Code

Comment thread net/swgp-go/README.md Outdated
Comment thread net/swgp-go/README.md Outdated

start_service() {
procd_open_instance
procd_set_param command $SWGP_GO_BIN -confPath $SWGP_GO_CONF -logLevel DEBUG

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log level is hard-coded to DEBUG, which is very verbose for a proxy that continuously handles traffic and will flood the system log by default. Was that intentional, or should this be a saner default such as info (optionally made configurable via UCI)?


Generated by Claude Code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't log for each packet, but logs two more lines once a new session is established. There isn't any uci config integration so far, and logging for sessions is also something dropbear does, so I'd say it's ok to keep it that way for now.

Comment thread net/swgp-go/Makefile Outdated
Comment thread net/swgp-go/Makefile Outdated
@flokli flokli force-pushed the swgp-go branch 2 times, most recently from 50cadf8 to 2a96be0 Compare July 9, 2026 07:54

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed after the earlier feedback was addressed (the commit was amended). Verified the fixes against the current tree:

  • README config path is now /etc/swgp-go.json, consistent with the Makefile conffiles/install rule and SWGP_GO_CONF in the init script.
  • README start-command typo swpg-goswgp-go corrected.
  • Makefile TITLE:=/URL:= leading space removed.
  • Empty $(1)/etc/config dropped from the INSTALL_DIR line.

The -logLevel DEBUG question was answered (logging only occurs on session establishment, comparable to dropbear) — no objection to keeping it.

Reviewed 1 amended commit ("swgp-go: add at 1.10.0"); message still matches the diff and Signed-off-by is present. No new issues found.


Generated by Claude Code

@flokli

flokli commented Jul 9, 2026

Copy link
Copy Markdown
Author

Erf, seems there's a \t between the name and the version, not a space. Replaced with two separate invocations, as seen in multimedia/imagemagick/test.sh.

@flokli flokli force-pushed the swgp-go branch 2 times, most recently from c7ef391 to d9400d2 Compare July 9, 2026 21:00

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the one new change since the last review (the amended commit updated only net/swgp-go/test.sh). All previously-raised items were addressed. One minor note on the test script's exit-status handling inline. The commit message ("swgp-go: add at 1.10.0") still matches the diff and Signed-off-by is present. CI is still pending, so no build results to comment on.


Generated by Claude Code

Comment thread net/swgp-go/test.sh Outdated
Compiled on x86_64-linux, successfully tested on mediatek/filogic,
25.12.5.

Signed-off-by: Florian Klink <flokli@flokli.de>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the one new change since the last review: the amended commit updated only net/swgp-go/test.sh. My earlier exit-status note is addressed — the version check ($2) now gates the exit via an explicit exit 1 on mismatch, and the package-name ($1) check was intentionally dropped.

Commit checks

  • Reviewed 1 amended commit (swgp-go: add at 1.10.0); message still matches the diff (new package addition), Signed-off-by present.
  • No new issues. The [ $? == 0 ] construct is fine here: these test scripts run under busybox ash (per the shellcheck shell=busybox convention in CONTRIBUTING.md), whose test/[ accepts ==, and this mirrors the existing in-tree net/tcpreplay/test.sh.

CI is still pending, so no build results to comment on.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Add package AI It looks like this is issue or pull request was created by AI or it includes AI comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants