mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #1396] [MERGED] Pass server configuration as an argument #4376
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#4376
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/1396
Author: @velovix
Created: 8/19/2019
Status: ✅ Merged
Merged: 8/20/2019
Merged by: @fatedier
Base:
dev← Head:issue-1387_server-conf-as-argument📝 Commits (2)
6277af4Pass server configuration as an argument5fc7b3cRemove global ServerService variable📊 Changes
14 files changed (+117 additions, -149 deletions)
View changed files
📝
cmd/frps/root.go(+40 -44)📝
g/g.go(+0 -10)📝
go.sum(+2 -0)📝
models/config/proxy.go(+18 -18)📝
models/config/server_common.go(+5 -23)📝
server/control.go(+16 -12)📝
server/dashboard.go(+1 -2)📝
server/dashboard_api.go(+9 -11)📝
server/proxy/http.go(+4 -5)📝
server/proxy/https.go(+3 -4)📝
server/proxy/proxy.go(+7 -6)📝
server/proxy/tcp.go(+2 -3)📝
server/proxy/udp.go(+1 -2)📝
server/service.go(+9 -9)📄 Description
The ServerCommonConf is now passed around as an argument instead of being shared between components as a global variable. This allows for more natural interaction with server.Session as a library and allows for multiple servers to co-exist within the same process.
This on its own is not an ideal solution because a lot more information is being passed around than is necessary. Splitting up this configuration information may be done as a future step by @fatedier.
Related: #1387
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.