1
mirror of https://github.com/xddxdd/bird-lg-go synced 2025-10-17 22:42:12 +02:00

11 Commits

Author SHA1 Message Date
Lan Tian
01438edaef release: v1.3.7.1 2024-03-12 18:05:50 -07:00
Lan Tian
90f36610dc ci: fix failing whois test 2024-03-12 18:03:23 -07:00
Lan Tian
6174208d07 ci: fix typo in release workflow 2024-03-12 17:56:52 -07:00
Lan Tian
76174cdc08 release: v1.3.7 2024-03-12 17:47:29 -07:00
Lan Tian
088bb6fe5a readme: add mention of MTR based lgproxy docker image 2024-03-12 17:46:56 -07:00
Lan Tian
3951eed011 ci: fix dockerfile path for proxy image with mtr 2024-03-09 12:21:00 -08:00
Lan Tian
91c0a8962b ci: also test mtr binary in proxy image 2024-03-09 12:09:19 -08:00
Lan Tian
5f7850a903 ci: also build docker image with mtr on regular commits 2024-03-09 12:05:20 -08:00
Lan Tian
6a78cf2e80 proxy: add docker image with mtr 2024-03-09 12:04:05 -08:00
Lan Tian
5b5a44bcb6 release: v1.3.6 2024-02-25 19:47:39 -08:00
Marc 'risson' Schmitt
ac31862237 frontend: show dynamic BGP sessions without any color (#98)
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2024-02-18 22:11:20 -08:00
7 changed files with 71 additions and 6 deletions

View File

@@ -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

View File

@@ -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
View File

@@ -20,7 +20,3 @@ proxy/proxy
# don't include generated bindata file
frontend/bindata.go
# don't include generated Dockerfiles
frontend/Dockerfile.*
proxy/Dockerfile.*

View File

@@ -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

View File

@@ -1 +1 @@
v1.3.5
v1.3.7.1

View File

@@ -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
View 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"]