mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #3472] [MERGED] stcp, xtcp, sudp: support allow_users and specified server user #4757
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#4757
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/3472
Author: @fatedier
Created: 6/1/2023
Status: ✅ Merged
Merged: 6/2/2023
Merged by: @fatedier
Base:
dev← Head:remote-user📝 Commits (1)
d60dd1estcp, xtcp, sudp: support allow_users and specified server user📊 Changes
17 files changed (+355 additions, -176 deletions)
View changed files
📝
.gitignore(+1 -0)📝
Makefile(+15 -0)➕
hack/download.sh(+63 -0)📝
hack/run-e2e.sh(+18 -8)📝
pkg/config/client.go(+1 -1)📝
pkg/config/proxy.go(+113 -103)📝
pkg/config/visitor.go(+3 -3)📝
pkg/msg/msg.go(+3 -2)📝
pkg/nathole/controller.go(+17 -11)📝
server/control.go(+4 -4)📝
server/proxy/stcp.go(+6 -1)📝
server/proxy/sudp.go(+6 -2)📝
server/proxy/xtcp.go(+6 -2)📝
server/service.go(+10 -1)📝
server/visitor/visitor.go(+27 -16)📝
test/e2e/basic/basic.go(+61 -21)📝
test/e2e/framework/process.go(+1 -1)📄 Description
Summary
🤖 Generated by Copilot at ae8d19f
This pull request adds a new feature to allow proxy owners to specify which users can access their server role proxies as visitors, and improves the end-to-end testing and error handling for this feature. It also adds a script to download the latest frp release and refactors some configuration and message code for consistency and clarity. The main files affected are
pkg/config/proxy.go,pkg/nathole/controller.go,server/control.go,server/visitor/visitor.go,test/e2e/basic/basic.go,hack/download.sh,pkg/msg/msg.go, and the proxy files inserver/proxy.WHY
Walkthrough
🤖 Generated by Copilot at ae8d19f
NatHoleControllerto accept and check the allowUsers and visitorUser parameters for xtcp proxies (link, link)Controlstruct to pass the visitor user name to theNatHoleControllerand improve the error messages for proxy registration (link, link, link)Servicestruct to get the visitor user name from the control manager and pass it to theVisitorManager(link)VisitorManagerto use a new typelistenerBundleto wrap the listener, sk, and allowUsers fields together, and check the visitor user's permission before accepting the connection (link, link, link, link, link, link)STCPProxy,SUDPProxy, andXTCPProxystructs to accept the allowUsers parameter and pass it to theVisitorManageror theNatHoleController(link, link, link)run-e2e.shscript to use /bin/sh instead of /usr/bin/env bash, and allow setting the FRPC_PATH and FRPS_PATH variables to use custom binaries for frpc and frps (link, link)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.