frp icon indicating copy to clipboard operation
frp copied to clipboard

Using a custom address

Open lcombaldieu opened this issue 1 year ago • 6 comments

Hi,

I would like my frp to generate custom links for my demos. For example, launching an interface would produce links such as : demo1.my-website.com demo2.my-website.com Instead of qsdcjbqosqsdcq.my-website.com

Is this possible ? Where could I tinker in the code ?

lcombaldieu avatar Feb 14 '24 12:02 lcombaldieu

here is where the random prefix is generated. still trying to figure out how to change that...

https://github.com/huggingface/frp/blob/b10131fda49c673c7aeaf604377051521cdc2334/server/control.go#L465

cpwan avatar Feb 20 '24 03:02 cpwan

I have opened a pull request with a solution using env variable to set the custom name.

See the code here

lcombaldieu avatar Feb 20 '24 15:02 lcombaldieu

great work!

how about generating a custom proxyname that can relate to the script that is launched? for example:

chat.my-website.com sdxl.my-website.com mistral.my-website.com llama.my-website.com

how could we pass that variable

ckasimis avatar Feb 24 '24 12:02 ckasimis

Nice idea ! However I think for this kind of feature to work, a bit more engineering is required on Gradio's side. You would need to add changes to gradio's python lib and the frp repo. Maybe @abidlabs can help for this.

lcombaldieu avatar Feb 26 '24 09:02 lcombaldieu

I have opened a pull request with a solution using env variable to set the custom name.

See the code here

thanks for your work, it save me a lot of time . but it seems only change the rule of proxyName on the server side.

frpc need to be correspond with same rule here: https://github.com/huggingface/frp/blob/dev/client/proxy/proxy_manager.go#L137

Frank-Jie avatar Mar 08 '24 06:03 Frank-Jie

I'm still having trouble making it work. If anyone with more expertise with go and frp can review the pull request, that would be helpful.

@Frank-Jie did you manage to do it ? I would be interested in your solution

lcombaldieu avatar Mar 27 '24 11:03 lcombaldieu

Closing, sorry this is not something that we are planning on including in this repo, but you are welcome to fork the FRP repo and make your own changes.

abidlabs avatar Mar 04 '25 22:03 abidlabs