mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-24 05:33:43 -05:00
Closed
opened 2026-04-16 09:40:08 -05:00 by GiteaMirror
·
0 comments
No Branch/Tag Specified
main
dependabot/docker/docker-dependencies-6cbd4d48e0
dependabot/npm_and_yarn/npm-dependencies-8b2d4a9f3a
dependabot/go_modules/install/go-install-dependencies-3804ca7238
dev
refactor/batch-status-requests
dependabot/npm_and_yarn/body-parser-2.3.0
dependabot/npm_and_yarn/axios-1.18.0
crowdin_dev
fix/labels-dropdown-flicker
dependabot/github_actions/github-actions-dependencies-2ee11778c9
feat/remember-last-idp-on-smart-login-form
dependabot/npm_and_yarn/multi-5f1280885e
fix/non-semver-version-error
private-resource-page
resource-launcher
backhaul
exit-node-reconnect
feat/command-palette
ssh
delete-account
msg-delivery
org-only-idp
cicd
patch
site-targets-auto-login
1.21.0
1.21.0-rc.0
1.20.0
1.20.0-rc.0
1.19.4
1.19.3
1.19.2
1.19.1
1.19.0
1.19.0-rc.1
1.19.0-rc.0
1.18.4
1.18.3
1.18.2
1.18.1
1.18.0
1.18.0-rc.0
1.17.1
1.17.0
1.17.0-rc.0
1.16.2
1.16.1
1.16.0
1.16.0-rc.0
1.15.4
1.15.3
1.15.2
1.15.1
1.15.0
1.15.0-rc.0
1.14.1
1.14.0
1.14.0-rc.0
1.13.1
1.13.0
1.13.0-rc.0
1.12.3
1.12.2
1.12.1
1.12.0
1.12.0-rc.0
1.11.1
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.9.4
1.9.3
1.9.2
1.9.1
1.9.0
1.8.0
1.7.3
1.7.2
1.7.1
1.7.0
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
1.0.0-beta.15
1.0.0-beta.14
1.0.0-beta.13
1.0.0-beta.12
1.0.0-beta.11
1.0.0-beta.10
1.0.0-beta.9
1.0.0-beta.8
1.0.0-beta.7
1.0.0-beta.6
1.0.0-beta.5
1.0.0-beta.4
1.0.0-beta.3
1.0.0-beta.2
1.0.0-beta.1
Labels
Clear labels
api
authentication
bug
config
dependencies
docker
documentation
enhancement
good first issue
help wanted
Improvement
Look Into
needs investigating
networking
new feature
non-critical bug
potential bug
pull-request
question
reverse proxy
Security
stale
ui
wontfix
Mirrored from GitHub Pull Request
No labels
pull-request
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/pangolin#2887
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2149
Author: @infiniteWays
Created: 12/22/2025
Status: ✅ Merged
Merged: 3/30/2026
Merged by: @oschwartz10612
Base:
dev← Head:feature/region-rules📝 Commits (4)
e051142Add region-based resource rule3d4df90Added missing translations073b89bmake path the defaultbe3e066Merge branch 'dev' into feature/region-rules📊 Changes
9 files changed (+693 additions, -18 deletions)
View changed files
📝
messages/de-DE.json(+34 -0)📝
messages/en-US.json(+34 -0)📝
messages/ru-RU.json(+34 -0)➕
server/db/regions.ts(+196 -0)📝
server/routers/badger/verifySession.test.ts(+94 -2)📝
server/routers/badger/verifySession.ts(+46 -0)📝
server/routers/resource/createResourceRule.ts(+11 -1)📝
server/routers/resource/updateResourceRule.ts(+11 -1)📝
src/app/[orgId]/settings/resources/proxy/[niceId]/rules/page.tsx(+233 -14)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Hi Owen and Pangolins!
I just saw the pull request #2095 and was intrigued to add also a region rule.
I realized that something like that would be useful for regions of the earth with a high country density, it can be extremely tedious to create large amounts of rules.
I had a look around on what regional "classifications" there are and chose the one of the United Nations Statistical Division ("M49 Standard") which apparently also somehow got into Unicode.
This feature aims to add the rule cateogory "Region" based on that.


The numbers in parentheses are the M49 codes according to the UNSD.
Also included are three language localizations that I could do. English, German and Russian. I assume one could use a regular translator for the rest as the localizations are just single words. I however didn't want to mess with any "translation workflow", so I skipped on language I do not speak good enough.
Happy Holidays,
Dennis
How to test?
Testing this should work straight without any modifications to the way you run the container.
It is based on the same principles as the country rules.
I had some issues with integration testing resource accesses locally. If anyone has some time, a nice tutorial would be awesome!
Also, I had some issues with the drizzle.config.ts files in WSL/Windows. I had to exchange the
const schema = [path.join(...)]withconst schema = ["server/db/sqlite/schema/"]. Not sure if this is good or not, but it made me follow the instructions in the docs.I however verified with curl that verifySession responds correctly according to the set rules shown above when messing around with the reported IP:
reports back
while exchanging the IP with an IP outside Europe, the API reports:
Please thoroughly double-check this on a working integration test server.
What could be improved?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.