mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3317] Autorun on OpenWRT #2658
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#2658
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 @lavinkabul on GitHub (Feb 17, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3317
Describe the feature request
I am new to linux and OpenWRT in particular. I installed the frp server on my Ubuntu VPS using the auto-installation script and it was automatically added to startup. How to do the same with frp client on router with OpenWRT? Maybe there is a universal auto-installation script, with the subsequent ability to edit the configuration from luci?
In addition, my VPS sometimes reboots (due to the fault of the provider), I would like the frp client to constantly try to reconnect when it loses connection with the server (for example, with a pause of 5 minutes).
Could you tell me how to do this?
I have OpenWRT 21.02.5
Describe alternatives you've considered
No response
Affected area
@guokun1998 commented on GitHub (Feb 17, 2023):
Openwrt is base on Linux. You should kown your openwrt arch. It is usually arm64/misple/etc. And you can find releases package in
https://github.com/fatedier/frp/releases.Like, frp_0.47.0_linux_arm64.tar.gz
@lavinkabul commented on GitHub (Feb 17, 2023):
I have already installed frpc on OpenWRT and configured to work with remote frps server on Ubuntu OS. Everything works fine until restarting the router (Openwrt). After rebooting the router, frpc does not start on the router. Therefore, I would like to somehow register in autoload and cyclic restart of frpc, if suddenly the remote server where frps is located was not available for some time (for example, there was no Internet or the remote server rebooted)
@guokun1998 commented on GitHub (Feb 17, 2023):
client log is :
When server close, clinet will reconnect.
I am using v0.47.0.
@lavinkabul commented on GitHub (Feb 17, 2023):
When OpenWRT restarts, frpc does not start automatically. I need to do it manually
@guokun1998 commented on GitHub (Feb 17, 2023):
It can use
init.dbash in OpenWRT.@lavinkabul commented on GitHub (Feb 18, 2023):
I created a file in /etc/init.d/frpc and wrote to it:
Did chmod 755 (rwxr-xr-x) for this file.
Next, frpc and frpc.ini placed in the /root folder
Also did chmod 755 (rwxr-xr-x)
From the ssh command line, I run the command:
/root/frpc -c /root/frpc.iniand everything works great.
Next, to check the operation of frpc, I reboot the router. But frpc won't start.
I understand that the mistake is in some trifle, but I can not understand what.
@Becods commented on GitHub (Feb 18, 2023):
opkg install luci-app-frpcThen go to openwrt's web management interface to configure.
@lavinkabul commented on GitHub (Feb 18, 2023):
I started from the web interface and started setting up frpc.

For example, what to choose here:
I tried different values (root, daemon). But frpc does not start automatically in any way.
Can it be configured somehow through "Scheduled Tasks", could you tell me if such a solution is suitable and how to implement it?
@lavinkabul commented on GitHub (Feb 19, 2023):
I'll add more. If I manually start frpc at http://192.168.1.1/cgi-bin/luci/admin/system/startup , the fast reverse proxy client starts up fine:

My guess is that maybe I need to add a pause before starting frpc after the router boots up. Only I don’t know which file to edit for this and which command to write.
@lavinkabul commented on GitHub (Feb 24, 2023):
In general, after searching the Internet, a solution was found. Checking for the presence of a process using the scheduler:
*/1 * * * * root ps -A | grep frpc > /dev/null || /etc/init.d/frpc startThe presence of the frpc process will be checked every minute.
Write it down on the page
http://192.168.1.1/cgi-bin/luci/admin/system/crontab@github-actions[bot] commented on GitHub (Mar 27, 2023):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.