Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Protocol Runner

VShawn edited this page May 16, 2022 · 1 revision

English

What is Protocol Runner

We need some tolls to open the remote sessions, these tools we call the Protocol Runner.

Currently, PRemoteM offering some built-in runner for all of the supported protocols:

Of course, you can also customize the initiator for some protocol

Customize your runner

PRemoteM supports custom external runner, as long as the external program supports passing parameters through command line or environment variables, you can start them with PRemoteM.


WinSCP

To demonstrate, here we add WinSCP as a SFTP runner.

WinSCP is a free SFTP, SCP, Amazon S3, WebDAV, and FTP client for Windows, it can open new session through command line.

winscp.exe sftp://username:password@example.com:22/
winscp.exe ftps://username:password@ftp.example.com/
  1. First you have to install WinSCP on your computer;

  2. In the setting page of PRemoteM,click Protocol -> SFTP -> , and input the name of your new Runner;

image

image

  1. Click select button, select WinSCP.exe path

  2. Click i button, the Macros will be prompted.

image

  1. Set CMD parameter

since the demo is sftp://username:password@example.com:22/

then we set parameter to sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%:%PRM_PORT%

  1. Change the default Runner to WinSCP

image

  1. Then all the SFTP session will be opened by WinSCP

image

简体中文

什么是 Protocol Runner

启动会话时我们需要一个工具来将配置转化为会话,这个工具我们称之为 Protocol Runner

例如目前 PRemoteM 内置了许多 Protocol Runner

当然你也可以为某些协议自定义启动器

定制启动器

现在,PRemoteM 支持自定义外部 Runner,只要外部程序支持通过命令行或环境变量传递参数,你就可以用 PRemoteM 来启动它们。

例如 SSH 协议中,PuTTY 可以通过命令 "putty.exe username@192.168.1.100 -pw mypassword",启动一个 SSH 会话,因此 PuTTY 可以作为 PRemoteM 的外置 Runner。


WinSCP

为演示如何定制自己的 Runner,我们将添加 WinSCP 作为 sftp 的 Runner

WinSCP 是一款开源图形化 SFTP 客户端,支持通过命令行开启会话

winscp.exe sftp://username:password@example.com:22/
winscp.exe ftps://username:password@ftp.example.com/
  1. 首先在你的电脑上安装 WinSCP 软件;

  2. 打开 PRemoteM 的设置界面,依次选择协议 -> “SFTP” -> "+",并输入 Runner 名称;

image

  1. 点击 “选择” 按钮,选择 WinSCP.exe 的程序路径

  2. 点击 “i” 按钮,查看弹出的全局变量名称

image

  1. 将 WinSCP 命令行参数中对应的项目改为全局变量

sftp://username:password@example.com:22/ 改为 sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%:%PRM_PORT%

  1. 将命令参数填入输入框,然后在顶部下拉栏中把默认 Runner 改为 WinSCP 即可。

image

  1. 之后 SFTP 将通过 WinSCP 程序启动

image

Known runners

here are some supported runner we found:

APP Type Arguments
WinSCP SFTP sftp://%PRM_USER_NAME%:%PRM_PASSWORD%@%PRM_ADDRESS%:%PRM_PORT%
FileZilla FTP SFTP sftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%
FileZilla FTP FTP ftp://%PRM_USERNAME%:%PRM_PASSWORD%@%PRM_HOSTNAME%
Kitty SSH -ssh %PRM_HOSTNAME% -P %PRM_PORT% -l %PRM_USER_NAME% -pw %PRM_PASSWORD% -%PRM_SSH_VERSION% -cmd ""%PRM_STARTUP_AUTO_COMMAND%""
TightVNC VNC %PRM_HOSTNAME%::%PRM_PORT% -password=%PRM_PASSWORD% -scale=auto
UltraVNC VNC %PRM_HOSTNAME%:%PRM_PORT% -password %PRM_PASSWORD%