Skip to content

Commit b2ccf4b

Browse files
committed
Update .gitignore, add LICENSE, and enhance README with build instructions
1 parent 2a37940 commit b2ccf4b

4 files changed

Lines changed: 78 additions & 4 deletions

File tree

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
/build/
33

44
# ignore backup files
5-
*.bak
5+
*.bak
6+
7+
# ignore vscode workspace files
8+
.vscode/
9+
10+
# ignore test files
11+
*_test.go

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Jonathan Rogers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,33 @@
33
APP_NAME := reverse-soxy
44
BUILD_DIR := build
55

6-
.PHONY: all clean linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 windows_amd64 windows_arm64
6+
.PHONY: all clean linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 windows_amd64 windows_arm64 detect_os_arch
77

8-
all: linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 windows_amd64 windows_arm64
8+
all: detect_os_arch
99

1010
$(BUILD_DIR):
1111
mkdir -p $(BUILD_DIR)
1212

13+
detect_os_arch:
14+
@echo "Detecting OS and architecture..."
15+
@OS_TYPE=$$(uname -s | tr '[:upper:]' '[:lower:]') && \
16+
ARCH_TYPE=$$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
17+
case "$$OS_TYPE" in \
18+
linux*) \
19+
case "$$ARCH_TYPE" in \
20+
amd64) $(MAKE) linux_amd64 ;; \
21+
arm64) $(MAKE) linux_arm64 ;; \
22+
*) echo "Unsupported architecture: $$ARCH_TYPE"; exit 1 ;; \
23+
esac ;; \
24+
darwin*) \
25+
case "$$ARCH_TYPE" in \
26+
amd64) $(MAKE) darwin_amd64 ;; \
27+
arm64) $(MAKE) darwin_arm64 ;; \
28+
*) echo "Unsupported architecture: $$ARCH_TYPE"; exit 1 ;; \
29+
esac ;; \
30+
*) echo "Unsupported OS: $$OS_TYPE"; exit 1 ;; \
31+
esac
32+
1333
linux_amd64: | $(BUILD_DIR)
1434
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o $(BUILD_DIR)/$(APP_NAME)-linux-amd64 ./cmd/reverse-soxy
1535

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,40 @@ A minimal, encrypted SOCKS5 tunnel for securely forwarding traffic between a **P
1212
- Graceful shutdown (SIGINT/SIGTERM) and automatic reconnect/backoff.
1313
- Simple YAML configuration override.
1414

15-
## Installation
15+
## Releases
16+
17+
Packages can be downloaded from the [releases](https://github.com/lonepie/reverse-soxy/releases) page.
18+
19+
## Docker
20+
21+
For instructions on building and running the application in Docker, see [README.docker.md](README.docker.md).
22+
23+
## Building
24+
25+
To build the project, you can use either Go or Make. Follow the instructions below:
26+
27+
### Using Go
1628

1729
```bash
30+
# Clone the repository
31+
git clone https://github.com/lonepie/reverse-soxy.git
32+
cd reverse-soxy
33+
1834
# Go 1.20+
1935
go build -o build/reverse-soxy ./cmd/reverse-soxy
2036
```
2137

38+
### Using Make
39+
40+
```bash
41+
# Clone the repository
42+
git clone https://github.com/lonepie/reverse-soxy.git
43+
cd reverse-soxy
44+
45+
# Build using Make
46+
make
47+
```
48+
2249
## Usage
2350

2451
### Proxy mode

0 commit comments

Comments
 (0)