fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.98k stars 13.31k forks source link

This is a command line tool. You need to open cmd.exe and run it from there. #3584

Closed dellshan closed 1 year ago

dellshan commented 1 year ago

Bug Description

This is a command line tool.

You need to open cmd.exe and run it from there.

frpc Version

This is a command line tool. You need to open cmd.exe and run it from there.

frps Version

This is a command line tool. You need to open cmd.exe and run it from there.

System Architecture

This is a command line tool. You need to open cmd.exe and run it from there.

Configurations

This is a command line tool.

You need to open cmd.exe and run it from there.

Logs

No response

Steps to reproduce

  1. ...

Affected area

vithusel commented 1 year ago

There is literally no information to go off of here.

If you are trying to run frp on a windows machine, server or normal client it needs to be run headless. Theres no gui interface.

You can launch it by opening command prompt or powershell. Navigate to the directory where frp resides and type ./frpc.exe or ./frps.exe depending on what you are using. You will also need to configure the config file so the launch parameters would have -c whatevernotconfig.ini etc

lss4 commented 1 year ago

This is not really a bug but certainly not friendly for especially Windows -- as even shortcuts configured with necessary arguments would not work because of this. I've run into this issue many times before.

The correct way to run frp in Windows is to create a bat/cmd file with the necessary arguments, then create a shortcut pointing to the bat/cmd with correct working directory, instead of the frp executable itself.

At least as of Windows 10 there's no option for shortcuts to make it "run in a terminal" like some Linux DEs.

vithusel commented 1 year ago

If really needed. Someone could wrap frp.exe with another exe with the launch parameters preconfigured.

fimmspin commented 1 year ago

You can set the shortcut to point to cmd.exe and execute the command: cmd.exe /c "C:\frp-folder\frpc.exe -c frpc.ini"