mirror of
https://github.com/flant/ovpn-admin.git
synced 2024-11-30 08:16:46 +02:00
Renaming to ovpn-admin
This commit is contained in:
parent
5c5c874788
commit
9629f51e76
@ -16,6 +16,7 @@ frontend/node_modules
|
|||||||
openvpn-web-ui
|
openvpn-web-ui
|
||||||
openvpn-ui
|
openvpn-ui
|
||||||
openvpn-admin
|
openvpn-admin
|
||||||
|
ovpn-admin
|
||||||
|
|
||||||
docker-compose.yaml
|
docker-compose.yaml
|
||||||
docker-compose-slave.yaml
|
docker-compose-slave.yaml
|
6
.github/workflows/publish-latest.yaml
vendored
6
.github/workflows/publish-latest.yaml
vendored
@ -17,14 +17,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
repository: flant/openvpn-admin
|
repository: flant/ovpn-admin
|
||||||
tags: openvpn-latest
|
tags: openvpn-latest
|
||||||
dockerfile: Dockerfile.openvpn
|
dockerfile: Dockerfile.openvpn
|
||||||
- name: Push openvpn-admin image to Docker Hub
|
- name: Push ovpn-admin image to Docker Hub
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
repository: flant/openvpn-admin
|
repository: flant/ovpn-admin
|
||||||
tags: latest
|
tags: latest
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
6
.github/workflows/publish-tag.yaml
vendored
6
.github/workflows/publish-tag.yaml
vendored
@ -21,14 +21,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
repository: flant/openvpn-admin
|
repository: flant/ovpn-admin
|
||||||
tags: openvpn-${{ steps.get_version.outputs.VERSION }}
|
tags: openvpn-${{ steps.get_version.outputs.VERSION }}
|
||||||
dockerfile: Dockerfile.openvpn
|
dockerfile: Dockerfile.openvpn
|
||||||
- name: Push openvpn-admin image to Docker Hub
|
- name: Push ovpn-admin image to Docker Hub
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
password: ${{ secrets.DOCKER_PASS }}
|
||||||
repository: flant/openvpn-admin
|
repository: flant/ovpn-admin
|
||||||
tags: ${{ steps.get_version.outputs.VERSION }}
|
tags: ${{ steps.get_version.outputs.VERSION }}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@ ccd_slave
|
|||||||
openvpn-web-ui
|
openvpn-web-ui
|
||||||
openvpn-ui
|
openvpn-ui
|
||||||
openvpn-admin
|
openvpn-admin
|
||||||
|
ovpn-admin
|
||||||
frontend/node_modules
|
frontend/node_modules
|
||||||
|
|
||||||
main-packr.go
|
main-packr.go
|
||||||
|
@ -5,11 +5,11 @@ RUN cd /app && npm install && npm run build
|
|||||||
FROM golang:1.14.2-buster AS backend-builder
|
FROM golang:1.14.2-buster AS backend-builder
|
||||||
COPY --from=frontend-builder /app/static /app/frontend/static
|
COPY --from=frontend-builder /app/static /app/frontend/static
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN go get -u github.com/gobuffalo/packr/v2/packr2 && cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static" -s -w' -o openvpn-admin && packr2 clean
|
RUN go get -u github.com/gobuffalo/packr/v2/packr2 && cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static" -s -w' -o ovpn-admin && packr2 clean
|
||||||
|
|
||||||
FROM alpine:3.13
|
FROM alpine:3.13
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=backend-builder /app/openvpn-admin /app
|
COPY --from=backend-builder /app/ovpn-admin /app
|
||||||
RUN apk add --update bash easy-rsa && \
|
RUN apk add --update bash easy-rsa && \
|
||||||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
||||||
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.3-rc.1/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \
|
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.3-rc.1/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \
|
||||||
|
2
build.sh
2
build.sh
@ -7,6 +7,6 @@ cd frontend && npm install && npm run build && cd ..
|
|||||||
|
|
||||||
packr2
|
packr2
|
||||||
|
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-admin
|
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o ovpn-admin
|
||||||
|
|
||||||
packr2 clean
|
packr2 clean
|
||||||
|
@ -13,15 +13,15 @@ services:
|
|||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
- 7778:1194 # for openvpn
|
- 7778:1194 # for openvpn
|
||||||
- 8081:8080 # for openvpn-admin because of network_mode
|
- 8081:8080 # for ovpn-admin because of network_mode
|
||||||
volumes:
|
volumes:
|
||||||
- ./easyrsa_slave:/etc/openvpn/easyrsa
|
- ./easyrsa_slave:/etc/openvpn/easyrsa
|
||||||
- ./ccd_slave:/etc/openvpn/ccd
|
- ./ccd_slave:/etc/openvpn/ccd
|
||||||
openvpn-admin:
|
ovpn-admin:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: openvpn-admin:local
|
image: ovpn-admin:local
|
||||||
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
|
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
|
||||||
environment:
|
environment:
|
||||||
- OPVN_SLAVE=1
|
- OPVN_SLAVE=1
|
||||||
network_mode: service:openvpn
|
network_mode: service:openvpn
|
||||||
|
@ -11,15 +11,15 @@ services:
|
|||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
- 7777:1194 # for openvpn
|
- 7777:1194 # for openvpn
|
||||||
- 8080:8080 # for openvpn-admin because of network_mode
|
- 8080:8080 # for ovpn-admin because of network_mode
|
||||||
volumes:
|
volumes:
|
||||||
- ./easyrsa_master:/etc/openvpn/easyrsa
|
- ./easyrsa_master:/etc/openvpn/easyrsa
|
||||||
- ./ccd_master:/etc/openvpn/ccd
|
- ./ccd_master:/etc/openvpn/ccd
|
||||||
openvpn-admin:
|
ovpn-admin:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: openvpn-admin:local
|
image: ovpn-admin:local
|
||||||
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="127.0.0.1:7777:tcp"
|
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="127.0.0.1:7777:tcp"
|
||||||
network_mode: service:openvpn
|
network_mode: service:openvpn
|
||||||
volumes:
|
volumes:
|
||||||
- ./easyrsa_master:/mnt/easyrsa
|
- ./easyrsa_master:/mnt/easyrsa
|
||||||
|
2
frontend/package-lock.json
generated
2
frontend/package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "openvpn-admin",
|
"name": "ovpn-admin",
|
||||||
"version": "1.0.1a",
|
"version": "1.0.1a",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "openvpn-admin",
|
"name": "ovpn-admin",
|
||||||
"description": "Vue.js admin ui for openvpn and easyrsa",
|
"description": "Vue.js admin ui for openvpn and easyrsa",
|
||||||
"version": "1.0.1a",
|
"version": "1.0.1a",
|
||||||
"author": "vitaliy.snurnitsin@gmail.com",
|
"author": "vitaliy.snurnitsin@gmail.com",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>openvpn-admin</title>
|
<title>ovpn-admin</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="dist/style.min.js"></script>
|
<script src="dist/style.min.js"></script>
|
||||||
|
4
main.go
4
main.go
@ -36,8 +36,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
listenHost = kingpin.Flag("listen.host","host for openvpn-admin").Default("0.0.0.0").String()
|
listenHost = kingpin.Flag("listen.host","host for ovpn-admin").Default("0.0.0.0").String()
|
||||||
listenPort = kingpin.Flag("listen.port","port for openvpn-admin").Default("8080").String()
|
listenPort = kingpin.Flag("listen.port","port for ovpn-admin").Default("8080").String()
|
||||||
serverRole = kingpin.Flag("role","server role master or slave").Default("master").HintOptions("master", "slave").String()
|
serverRole = kingpin.Flag("role","server role master or slave").Default("master").HintOptions("master", "slave").String()
|
||||||
masterHost = kingpin.Flag("master.host","url for master server").Default("http://127.0.0.1").String()
|
masterHost = kingpin.Flag("master.host","url for master server").Default("http://127.0.0.1").String()
|
||||||
masterBasicAuthUser = kingpin.Flag("master.basic-auth.user","user for basic auth on master server url").Default("").String()
|
masterBasicAuthUser = kingpin.Flag("master.basic-auth.user","user for basic auth on master server url").Default("").String()
|
||||||
|
Loading…
Reference in New Issue
Block a user