URL Scheme
Surge supports the following URL scheme actions on iOS and macOS.
On iOS, use the surge scheme:
surge:///start
On macOS, use the surge scheme. The surgeconfig scheme is also supported for compatibility. Mac 6.7.0+
surge:///install-config?url=x
surgeconfig:///install-config?url=x
Actions
surge:///startStart with selected configuration. iOS only.
surge:///stopStop current session. iOS only.
surge:///toggleStart or stop with selected configuration. iOS only.
surge:///install-config?url=xInstall a configuration from a URL. The URL should be encoded in percent encoding.
surge:///install-module?url=xInstall a module from a URL. The URL should be encoded in percent encoding.
surge:///email-license?email=x&key=yOpen the email license activation flow and prefill the email and license key.
On iOS, this is available only when no active non-trial license is installed.
On macOS, this is available only while the activation window is open.
surge:///enterprise-license?companyID=x&userID=y&passcode=zOpen the team license activation flow and prefill the company ID, user ID, and passcode.
team-licenseis an alias ofenterprise-license:surge:///team-license?companyID=x&userID=y&passcode=zThe following parameter aliases are also accepted:
companyID,company-id,company_id,companyuserID,user-id,user_id,userpasscode,pass-code,pass_code
On iOS, this is available only when no active non-trial license is installed.
On macOS, this is available only while the activation window is open.
Options
autoclose=trueAutomatically close Surge after the action is completed. iOS only. Cannot be used with
install-config.Example:
surge:///toggle?autoclose=true
x-callback-url
Surge supports x-callback-url specification from v3.4. The URL scheme is surge and the available actions are start, stop and toggle.