mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #1378] Support for persistent reservations #1093
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#1093
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?
Originally created by @lukacu on GitHub (Aug 12, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1378
Hi, is there any interest in supporting persistent port reservations (so that a proxy is assigned the same port even if the server is restarted)? I am willing to implement it myself because we need it in our usage scenario, I am just asking if I should also create a PR to the main repo?
@fatedier commented on GitHub (Aug 13, 2019):
How do you want to do that? Save in db or local file?
I prefer not import much complexity and consider do these things as a plugin feature.
We can design some interface exported to plugins. Like
RequestNewPortorCheckAuthenticationsupport GRPC or just HTTP protocol.In frps.ini, it may be:
frps will send grpc request to
127.0.0.1:8080and get the result to assign a port.@lukacu commented on GitHub (Aug 13, 2019):
Well, my idea was simply to use a local file, but I do not mind the plugin version, although I am not sure if the current plugin architecture allows this (plugins are currently used on client?). The RPC solution sounds very complicated, for my use case a plugin that would save reservations to a file would be enough.
@fatedier commented on GitHub (Aug 13, 2019):
Plugins i mentioned above is not the
plugins used in client, it can be a long running processor.I want to see that every one can write plugins for different scenario and share with others to expand the usage of frp.
Users can download plugins they need or just run single frp server without plugins.
I will take the time to do the design for
Manager Plugin. After that, maybe you can provide a plugin calledPortManager.@lukacu commented on GitHub (Aug 13, 2019):
Yes, indeed. That would be very cool, but I guess it will require some work. Also, the current plugin architecture does not seem to use dynamic libraries as it is usually the case with plugins. You have to compile the entire executable which then makes plugins a bit redundant. From what I have seen, Go supports plugins, but only on Linux and Mac at the moment.
I will then wait for a plugin architecture and then write my use case as a plugin.
@fatedier commented on GitHub (Aug 14, 2019):
What we need is not the dynamic libraries. I think RPC is good enough. You can write extension feature on any os with any language not only in golang. This is important.
@lukacu commented on GitHub (Aug 14, 2019):
Ok, fine, although this will eventually make the system more complex. The port manager case will work well in such a way, I am less sure about some more data-intensive use-cases. Then I am awaiting you implementation so that I can implement persistence.
@lukacu commented on GitHub (Nov 29, 2019):
Hey, so I do not want to bother you too much, but are there some plans to implement a general server plugin API? I now have at least two use-cases for this :) Is it possible that you at least draft your idea in a comment and then somebody can try and implement it? I really do not want to fork the code just to add some quick and dirty hacks.
@fatedier commented on GitHub (Nov 29, 2019):
Sorry. I am busy at work at present. I will try to draft a design doc next month.
@fatedier commented on GitHub (Dec 2, 2019):
I write the design doc here #1403
You can read it and make sure if it can meet your need.
@lukacu commented on GitHub (Dec 2, 2019):
Great, thanks. It is suitable for the use case in this issue, but my other use case would need support for generating a file from a template for the entire list of proxies (this is how I could easily add Let's encrypt support using Traefik). I assume that this can be added using additional plugin operations? I do not want to go too off-topic here, so I can open another issue for that once some work on the API is implemented to some degree.
@fatedier commented on GitHub (Dec 2, 2019):
I'm not clear at your second use case. You can open another issue to describe it in detail.
If you write the persistent reservations plugin, you can share it in https://github.com/gofrp/plugin .
@fatedier commented on GitHub (Jan 5, 2020):
@lukacu v0.31.0 is released and it support server manage plugin.
@lukacu commented on GitHub (Jan 6, 2020):
Excellent, I will try it out. Thanks!
@lukacu commented on GitHub (Mar 27, 2020):
Just to let you know that I have implemented a persistent reservation plugin in my dockerized version of FRP server. The other plugin that I was talking about is also there. It is a Let's Encrypt proxy that enables TLS for plain HTTP clients. I hope that it could someday be implemented directly in FRP core because it is kind of hacky.
@fatedier commented on GitHub (Mar 28, 2020):
@lukacu Great! I will add a link on https://github.com/gofrp/plugin .
ACMEProxy maybe could include in frp core. I will take time to consider it.