mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #4983] [CLOSED] chore: Ip address whitelist on frpc #5092
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5092
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/4983
Author: @pipethedev
Created: 9/17/2025
Status: ❌ Closed
Base:
dev← Head:feature/ip-whitelist-for-proxied-services📝 Commits (7)
0270fd7tcp ip address whitelist on frps server95c59e1feat: add ip whitelist for proxied service accessc8db61cfeat: add ip whitelist for proxied service accessffd7ad5changed copyright year for ip_validator.gob5ba027use client side ip whitelist for proxy access controlf2ebf43feat: implemented test suites820aeb4fix: clarify allowedAccessIPs documentation in server configs📊 Changes
9 files changed (+483 additions, -0 deletions)
View changed files
📝
conf/frps.toml(+4 -0)📝
conf/frps_full_example.toml(+6 -0)📝
pkg/config/v1/proxy.go(+3 -0)📝
pkg/config/v1/proxy_test.go(+74 -0)📝
pkg/config/v1/server.go(+1 -0)📝
pkg/msg/msg.go(+1 -0)➕
pkg/util/net/ip_validator.go(+101 -0)➕
pkg/util/net/ip_validator_test.go(+265 -0)📝
server/proxy/proxy.go(+28 -0)📄 Description
Add IP Address Whitelist for Proxied Services
WHY
This feature addresses the need to restrict access to proxied services based on client IP addresses. Currently, FRP allows any IP to connect to proxied services once they're exposed. This creates security concerns for users who want to limit access to specific IP ranges or trusted networks.
This implementation provides per-proxy IP restrictions controlled by the client, allowing each service to have its own access control rules rather than server-wide restrictions.
Configuration Options:
TOML Configuration:
Features:
127.0.0.1) and CIDR blocks (192.168.1.0/24, IPv4/IPv6)Breaking Changes
None - this is a backward compatible feature that defaults to allowing all IPs when
allowedAccessIPsis not configured for a proxy.Implementation Details
allowedAccessIPsfield to proxy configuration in clienthandleUserTCPConnectionwith detailed logginguser connection from <IP> rejected: IP not in whitelistScreenshots
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.