You've already forked bird-lg-go
mirror of
https://github.com/xddxdd/bird-lg-go
synced 2025-10-17 22:42:12 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
01438edaef | ||
![]() |
90f36610dc | ||
![]() |
6174208d07 | ||
![]() |
76174cdc08 | ||
![]() |
088bb6fe5a | ||
![]() |
3951eed011 | ||
![]() |
91c0a8962b | ||
![]() |
5f7850a903 | ||
![]() |
6a78cf2e80 | ||
![]() |
5b5a44bcb6 | ||
![]() |
ac31862237 |
21
.github/workflows/develop.yaml
vendored
21
.github/workflows/develop.yaml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
- name: Test whois binary in frontend image
|
||||
run: |
|
||||
docker build -t local/frontend frontend/
|
||||
docker run --rm --net host --entrypoint whois local/frontend github.com || exit 1
|
||||
docker run --rm --net host --entrypoint whois local/frontend -I github.com || exit 1
|
||||
docker run --rm --net host --entrypoint whois local/frontend -h whois.ripe.net github.com || exit 1
|
||||
docker run --rm --net host --entrypoint whois local/frontend -h whois.ripe.net:43 github.com || exit 1
|
||||
|
||||
@@ -57,6 +57,12 @@ jobs:
|
||||
docker run --rm --net host --entrypoint traceroute local/proxy 127.0.0.1 || exit 1
|
||||
docker run --rm --net host --entrypoint traceroute local/proxy ::1 || exit 1
|
||||
|
||||
- name: Test mtr binary in proxy image
|
||||
run: |
|
||||
docker build -t local/proxy:mtr -f proxy/Dockerfile.mtr proxy/
|
||||
docker run --rm --net host --entrypoint mtr local/proxy:mtr -w -c1 -Z1 -G1 -b 127.0.0.1 || exit 1
|
||||
docker run --rm --net host --entrypoint mtr local/proxy:mtr -w -c1 -Z1 -G1 -b ::1 || exit 1
|
||||
|
||||
docker-develop:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
@@ -106,3 +112,16 @@ jobs:
|
||||
xddxdd/bird-lgproxy-go:develop-${{ github.sha }}
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-develop
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-develop-${{ github.sha }}
|
||||
|
||||
- name: Build proxy docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: '{{defaultContext}}:proxy'
|
||||
file: 'Dockerfile.mtr'
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
xddxdd/bird-lgproxy-go:develop-mtr
|
||||
xddxdd/bird-lgproxy-go:develop-${{ github.sha }}-mtr
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-develop-mtr
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-develop-${{ github.sha }}-mtr
|
||||
|
13
.github/workflows/release.yaml
vendored
13
.github/workflows/release.yaml
vendored
@@ -85,3 +85,16 @@ jobs:
|
||||
xddxdd/bird-lgproxy-go:${{ github.event.release.tag_name }}
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Build proxy docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: '{{defaultContext}}:proxy'
|
||||
file: 'Dockerfile.mtr'
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
xddxdd/bird-lgproxy-go:latest-mtr
|
||||
xddxdd/bird-lgproxy-go:${{ github.event.release.tag_name }}-mtr
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-mtr
|
||||
ghcr.io/xddxdd/bird-lg-go:proxy-${{ github.event.release.tag_name }}-mtr
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -20,7 +20,3 @@ proxy/proxy
|
||||
|
||||
# don't include generated bindata file
|
||||
frontend/bindata.go
|
||||
|
||||
# don't include generated Dockerfiles
|
||||
frontend/Dockerfile.*
|
||||
proxy/Dockerfile.*
|
@@ -167,6 +167,7 @@ Example: the following docker-compose.yml entry does the same as above, but by s
|
||||
services:
|
||||
bird-lgproxy:
|
||||
# Use xddxdd/bird-lgproxy-go:develop for the latest build from master branch
|
||||
# Use xddxdd/bird-lgproxy-go:latest-mtr to use MTR instead of Traceroute
|
||||
image: xddxdd/bird-lgproxy-go:latest
|
||||
container_name: bird-lgproxy
|
||||
restart: always
|
||||
|
@@ -193,6 +193,11 @@ func summaryParse(data string, serverName string) (TemplateSummary, error) {
|
||||
row.Info = strings.TrimSpace(lineSplitted[10])
|
||||
}
|
||||
|
||||
// Dynamic BGP session, show without any color
|
||||
if strings.Contains(row.Info, "Passive") {
|
||||
row.MappedState = summaryStateMap["passive"]
|
||||
}
|
||||
|
||||
// add to the result
|
||||
args.Rows = append(args.Rows, row)
|
||||
}
|
||||
|
31
proxy/Dockerfile.mtr
Normal file
31
proxy/Dockerfile.mtr
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM golang AS step_0
|
||||
|
||||
ENV CGO_ENABLED=0 GO111MODULE=on
|
||||
WORKDIR /root
|
||||
COPY . .
|
||||
RUN go build -ldflags "-w -s" -o /proxy
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM alpine:edge AS step_1
|
||||
|
||||
WORKDIR /root
|
||||
RUN apk add --no-cache build-base linux-headers
|
||||
|
||||
RUN wget https://www.bitwizard.nl/mtr/files/mtr-0.94.tar.gz \
|
||||
-O mtr-0.94.tar.gz
|
||||
RUN tar xvf mtr-0.94.tar.gz \
|
||||
&& cd mtr-0.94 \
|
||||
&& ./configure --without-gtk --without-ncurses --without-jansson --without-ipinfo --disable-bash-completion \
|
||||
&& make -j4 LDFLAGS="-static" \
|
||||
&& strip /root/mtr-0.94/mtr \
|
||||
&& strip /root/mtr-0.94/mtr-packet
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM scratch AS step_2
|
||||
ENV PATH=/
|
||||
COPY --from=step_0 /proxy /
|
||||
COPY --from=step_1 /root/mtr-0.94/mtr /
|
||||
COPY --from=step_1 /root/mtr-0.94/mtr-packet /
|
||||
ENTRYPOINT ["/proxy"]
|
Reference in New Issue
Block a user