Skip to content

Commit

Permalink
Update go and package name
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-russkikh committed Sep 1, 2024
1 parent 8e2b5bf commit 12cbe4a
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 28 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Windows amd64 Version
run: |
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o WireProxy_amd64.exe -v ./cmd/wireproxy
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Windows arm64 Version
run: |
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o WireProxy_arm64.exe -v ./cmd/wireproxy
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Linux amd64 Version
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o WireProxy_amd64 -v ./cmd/wireproxy
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Linux arm64 Version
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o WireProxy_arm64 -v ./cmd/wireproxy
Expand All @@ -97,7 +97,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Linux s390x Version
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o WireProxy_s390x -v ./cmd/wireproxy
Expand All @@ -117,7 +117,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Darwin amd64 Version
run: |
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o WireProxy_amd64 -v ./cmd/wireproxy
Expand All @@ -137,7 +137,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Building Darwin arm64 Version
run: |
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o WireProxy_arm64 -v ./cmd/wireproxy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.23'
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
version: latest
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setting up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Install dependencies
run: sudo apt install wireguard curl
- name: Building wireproxy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wireproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:

- name: Git clone WireProxy
run: |
git clone https://github.com/pufferffish/wireproxy.git ${{ env.workdir }}
git clone https://github.com/artem-russkikh/wireproxy-awg.git ${{ env.workdir }}
cp ./.github/wireproxy-releaser.yml ${{ env.workdir }}/.goreleaser.yml
- name: Set up GoReleaser
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start by building the application.
FROM docker.io/golang:1.21 as build
FROM docker.io/golang:1.23 as build

WORKDIR /usr/src/wireproxy
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build status](https://github.com/octeep/wireproxy/actions/workflows/build.yml/badge.svg)](https://github.com/octeep/wireproxy/actions)
[![Documentation](https://img.shields.io/badge/godoc-wireproxy-blue)](https://pkg.go.dev/github.com/octeep/wireproxy)

AmneziaWG compatible wireguard client that exposes itself as a socks5/http proxy or tunnels.
AmneziaWG compatible wireguard client that exposes itself as a socks5/http proxy or tunnels. Forked from [wireproxy](https://github.com/pufferffish/wireproxy)

# What is this
`wireproxy` is a completely userspace application that connects to a wireguard peer,
Expand Down
16 changes: 8 additions & 8 deletions cmd/wireproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/akamensky/argparse"
"github.com/amnezia-vpn/amneziawg-go/device"
"github.com/pufferffish/wireproxy"
wireproxyawg "github.com/artem-russkikh/wireproxy-awg"
"suah.dev/protect"
)

Expand Down Expand Up @@ -130,21 +130,21 @@ func extractPort(addr string) uint16 {
return uint16(port)
}

func lockNetwork(sections []wireproxy.RoutineSpawner, infoAddr *string) {
func lockNetwork(sections []wireproxyawg.RoutineSpawner, infoAddr *string) {
var rules []landlock.Rule
if infoAddr != nil && *infoAddr != "" {
rules = append(rules, landlock.BindTCP(extractPort(*infoAddr)))
}

for _, section := range sections {
switch section := section.(type) {
case *wireproxy.TCPServerTunnelConfig:
case *wireproxyawg.TCPServerTunnelConfig:
rules = append(rules, landlock.ConnectTCP(extractPort(section.Target)))
case *wireproxy.HTTPConfig:
case *wireproxyawg.HTTPConfig:
rules = append(rules, landlock.BindTCP(extractPort(section.BindAddress)))
case *wireproxy.TCPClientTunnelConfig:
case *wireproxyawg.TCPClientTunnelConfig:
rules = append(rules, landlock.ConnectTCP(uint16(section.BindAddress.Port)))
case *wireproxy.Socks5Config:
case *wireproxyawg.Socks5Config:
rules = append(rules, landlock.BindTCP(extractPort(section.BindAddress)))
}
}
Expand Down Expand Up @@ -205,7 +205,7 @@ func main() {
lock("read-config")
}

conf, err := wireproxy.ParseConfig(*config)
conf, err := wireproxyawg.ParseConfig(*config)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -244,7 +244,7 @@ func main() {

lock("ready")

tun, err := wireproxy.StartWireguard(conf.Device, logLevel)
tun, err := wireproxyawg.StartWireguard(conf.Device, logLevel)
if err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/pufferffish/wireproxy
module github.com/artem-russkikh/wireproxy-awg

go 1.21.1

toolchain go1.21.6
go 1.23

require (
github.com/MakeNowJust/heredoc/v2 v2.0.1
Expand Down
4 changes: 2 additions & 2 deletions systemd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The provided systemd unit assumes you have the wireproxy executable installed on

1. Copy the `wireproxy.service` file from this directory to `/etc/systemd/system/`, or use the following cURL command to download it:
```bash
sudo curl https://raw.githubusercontent.com/pufferffish/wireproxy/master/systemd/wireproxy.service > /etc/systemd/system/wireproxy.service
sudo curl https://raw.githubusercontent.com/artem-russkikh/wireproxyawg/master/systemd/wireproxy.service > /etc/systemd/system/wireproxy.service
```

2. If necessary, customize the unit.
Expand All @@ -32,4 +32,4 @@ The provided systemd unit assumes you have the wireproxy executable installed on

# Additional notes

If you want to disable the extensive logging that's done by Wireproxy, simply add `-s` parameter to `ExecStart=`. This will enable the silent mode that was implemented with [pull/67](https://github.com/pufferffish/wireproxy/pull/67).
If you want to disable the extensive logging that's done by Wireproxy, simply add `-s` parameter to `ExecStart=`. This will enable the silent mode that was implemented with [pull/67](https://github.com/artem-russkikh/wireproxyawg/pull/67).

0 comments on commit 12cbe4a

Please sign in to comment.