Note in README the possibility to use on a separate host #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test systemd | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Build | |
run: go build -v | |
- name: Install go-mmproxy | |
run: | | |
sudo cp go-mmproxy /usr/bin/go-mmproxy | |
sudo mkdir /etc/go-mmproxy | |
echo 192.168.0.0/16 | sudo tee /etc/go-mmproxy/net-prefixes.txt | |
sudo cp go-mmproxy.service.example /etc/systemd/system/go-mmproxy.service | |
sudo systemctl daemon-reload | |
- name: Start go-mmproxy | |
run: sudo systemctl start go-mmproxy || sudo journalctl -xeu go-mmproxy.service | |
- name: Check go-mmproxy status | |
run: systemctl is-active go-mmproxy | |
- name: Replace listen address of go-mmproxy with a hostname | |
run: | | |
sudo sed -i 's/-l 0.0.0.0:1234/-l %H:1234/' /etc/systemd/system/go-mmproxy.service | |
sudo systemctl daemon-reload | |
- name: Restart go-mmproxy | |
run: sudo systemctl restart go-mmproxy || sudo journalctl -xeu go-mmproxy.service | |
- name: Check go-mmproxy status | |
run: systemctl is-active go-mmproxy |