Skip to content

Commit

Permalink
Merge pull request #1556 from safing/feature/anycast-flag-name
Browse files Browse the repository at this point in the history
Show anycast addresses in UI
  • Loading branch information
dhaavi authored May 28, 2024
2 parents 1381556 + 274f81e commit 47f805c
Show file tree
Hide file tree
Showing 11 changed files with 1,249 additions and 813 deletions.
Binary file added assets/data/img/flags/__.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions desktop/angular/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mnt="$( cd ../.. && pwd )"
docker run \
-ti \
--rm \
-v $mnt:/portmaster-ui \
-w /portmaster-ui/modules/portmaster \
-v $mnt:/portmaster \
-w /portmaster/desktop/angular \
-p 8081:8080 \
node:latest \
npm start -- --host 0.0.0.0 --port 8080
1,902 changes: 1,164 additions & 738 deletions desktop/angular/package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions desktop/angular/src/app/pages/app-view/app-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ <h2 class="p-0 m-0 text-lg sfng-lg:text-xl text-primary">{{ (100 / stats!.size)
Get Help
</a>

<!--
TODO: "View Active" button is broken or should have been removed.
<div sfngTipUpAnchor="left" class="flex space-x-2 flex-rows">
<sfng-tipup key="appSettings-Filter"></sfng-tipup>
<sfng-select [ngModel]="viewSetting" (ngModelChange)="viewSettingChange.next($event)"
Expand All @@ -193,6 +195,7 @@ <h2 class="p-0 m-0 text-lg sfng-lg:text-xl text-primary">{{ (100 / stats!.size)
</sfng-select-item>
</sfng-select>
</div>
-->
</div>

<div class="flex items-center text-tertiary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ export class MapRendererComponent implements OnInit, AfterViewInit, OnDestroy {
data.forEach((country: any) => {
this.countryNames[country.properties.iso_a2] = country.properties.name
})
// Add special country values.
this.countryNames["__"] = "Anycast"

this.worldGroup.selectAll()
.data<GeoPermissibleObjects>(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export class ConnectionLocationPipe implements PipeTransform {
return '';
}
if (!!conn.country) {
if (conn.country === "__") {
return "Anycast"
}
return conn.country;
}

Expand Down
35 changes: 17 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ require (
github.com/Xuanwo/go-locale v1.1.0
github.com/agext/levenshtein v1.2.3
github.com/awalterschulze/gographviz v2.0.3+incompatible
github.com/brianvoe/gofakeit v3.18.0+incompatible
github.com/cilium/ebpf v0.15.0
github.com/coreos/go-iptables v0.7.0
github.com/dhaavi/go-notify v0.0.0-20190209221809-c404b1f22435
github.com/florianl/go-conntrack v0.4.0
github.com/florianl/go-nfqueue v1.3.1
github.com/florianl/go-nfqueue v1.3.2
github.com/fogleman/gg v1.3.0
github.com/ghodss/yaml v1.0.0
github.com/godbus/dbus/v5 v5.1.0
github.com/google/gopacket v1.1.19
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/go-version v1.7.0
github.com/jackc/puddle/v2 v2.2.1
github.com/mat/besticon v3.12.0+incompatible
github.com/miekg/dns v1.1.59
Expand All @@ -42,13 +43,13 @@ require (
github.com/tevino/abool v1.2.0
github.com/umahmood/haversine v0.0.0-20151105152445-808ab04add26
github.com/vincent-petithory/dataurl v1.0.0
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
golang.org/x/image v0.15.0
golang.org/x/net v0.24.0
golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d
golang.org/x/image v0.16.0
golang.org/x/net v0.25.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.19.0
golang.org/x/sys v0.20.0
gopkg.in/yaml.v3 v3.0.1
zombiezen.com/go/sqlite v1.2.0
zombiezen.com/go/sqlite v1.3.0
)

require (
Expand All @@ -58,7 +59,6 @@ require (
github.com/alessio/shellescape v1.4.2 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/bluele/gcache v0.0.2 // indirect
github.com/brianvoe/gofakeit v3.18.0+incompatible // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand Down Expand Up @@ -86,7 +86,6 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/satori/go.uuid v1.2.0 // indirect
Expand All @@ -97,8 +96,8 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
Expand All @@ -107,16 +106,16 @@ require (
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zalando/go-keyring v0.2.4 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
golang.org/x/crypto v0.22.0 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/tools v0.21.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gvisor.dev/gvisor v0.0.0-20240422234719-5cecdfbabd15 // indirect
modernc.org/libc v1.50.2 // indirect
gvisor.dev/gvisor v0.0.0-20240524212851-a244eff8ad49 // indirect
modernc.org/libc v1.50.9 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/sqlite v1.29.8 // indirect
modernc.org/sqlite v1.29.10 // indirect
)
Loading

0 comments on commit 47f805c

Please sign in to comment.