Skip to content

Commit cf1516f

Browse files
committed
swgp-go: add at 1.10.0
Compiled on x86_64-linux, successfully tested on mediatek/filogic, 25.12.5. Signed-off-by: Florian Klink <flokli@flokli.de>
1 parent 8ef980b commit cf1516f

4 files changed

Lines changed: 98 additions & 0 deletions

File tree

net/swgp-go/Makefile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Copyright (C) 2026 Florian Klink
3+
#
4+
# This is free software, licensed under the GNU General Public License v2.
5+
# See /LICENSE for more information.
6+
#
7+
8+
include $(TOPDIR)/rules.mk
9+
10+
PKG_NAME:=swgp-go
11+
PKG_VERSION:=1.10.0
12+
PKG_RELEASE:=1
13+
14+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15+
PKG_SOURCE_URL:=https://codeload.github.com/database64128/swgp-go/tar.gz/v$(PKG_VERSION)?
16+
PKG_HASH:=0d7e5ebce9c07237e71028eac31b27c51d155c5a72eefc7bceac4cc816725d23
17+
18+
PKG_MAINTAINER:=Florian Klink <flokli@flokli.de>
19+
PKG_LICENSE:=AGPL-3.0-or-later
20+
PKG_LICENSE_FILES:=LICENSE
21+
22+
PKG_BUILD_DEPENDS:=golang/host
23+
PKG_BUILD_PARALLEL:=1
24+
PKG_BUILD_FLAGS:=no-mips16
25+
26+
GO_PKG:=github.com/database64128/swgp-go
27+
GO_PKG_TAGS:=swgpgo_nopprof
28+
29+
include $(INCLUDE_DIR)/package.mk
30+
include ../../lang/golang/golang-package.mk
31+
32+
define Package/swgp-go
33+
SECTION:=net
34+
CATEGORY:=Network
35+
TITLE:= Simple WireGuard proxy
36+
URL:= https://github.com/database64128/swgp-go
37+
DEPENDS:=$(GO_ARCH_DEPENDS)
38+
endef
39+
40+
define Package/swgp-go/description
41+
Simple WireGuard proxy with minimal overhead for WireGuard traffic.
42+
endef
43+
44+
define Package/swgp-go/conffiles
45+
/etc/swgp-go.json
46+
endef
47+
48+
define Package/swgp-go/install
49+
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
50+
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/swgp-go $(1)/usr/sbin
51+
$(INSTALL_BIN) ./files//swgp-go.init $(1)/etc/init.d/swgp-go
52+
$(INSTALL_DATA) ./files//swgp-go.json $(1)/etc/swgp-go.json
53+
endef
54+
55+
$(eval $(call BuildPackage,swgp-go))

net/swgp-go/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# swgp-go
2+
This readme should help you configure swgp-go.
3+
4+
## Configuration
5+
Edit `/etc/swgp.json` with your desired configuration (Client, Server or both).
6+
7+
If you're configuring a server, also properly allow that port in your firewall.
8+
9+
Note the pprof feature is disabled in this package. If you try to enable it
10+
regardless, `swgp-go` will show an error on startup.
11+
12+
## Start daemon
13+
Once you have created your config, enable and run swgp-go using its init script:
14+
15+
```
16+
/etc/init.d/swgp-go enable
17+
/etc/init.d/swpg-go start
18+
```
19+
20+
Please refer to the [Project README](https://github.com/database64128/swgp-go) for more configuration info and examples.

net/swgp-go/files/swgp-go.init

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh /etc/rc.common
2+
#
3+
# SPDX-License-Identifier: GPL-2.0-only
4+
5+
USE_PROCD=1
6+
START=90
7+
8+
SWGP_GO_BIN="/usr/sbin/swgp-go"
9+
SWGP_GO_CONF="/etc/swgp-go.json"
10+
11+
start_service() {
12+
procd_open_instance
13+
procd_set_param command $SWGP_GO_BIN -confPath $SWGP_GO_CONF -logLevel DEBUG
14+
procd_set_param file "$SWGP_GO_CONF"
15+
procd_set_param stdout 1
16+
procd_set_param stderr 1
17+
procd_set_param respawn
18+
procd_close_instance
19+
}

net/swgp-go/files/swgp-go.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"servers": [],
3+
"clients": []
4+
}

0 commit comments

Comments
 (0)