Skip to content

Commit

Permalink
#1252: support xpras:// and convert tcp connection string to ssl when…
Browse files Browse the repository at this point in the history
… this is used

git-svn-id: https://xpra.org/svn/Xpra/trunk@13106 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 28, 2016
1 parent 78d35c7 commit a72a90e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions osx/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<key>CFBundleURLSchemes</key>
<array>
<string>xpra</string>
<string>xpras</string>
</array>
<key>CFBundleURLName</key>
<string>Xpra Session</string>
Expand Down
5 changes: 5 additions & 0 deletions src/win32/xpra.iss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Root: HKCR; Subkey: "xpra"; ValueType: "string"; ValueName: "URL Protocol"; Valu
Root: HKCR; Subkey: "xpra\DefaultIcon"; ValueType: "string"; ValueData: "{app}\Xpra.exe,0"
Root: HKCR; Subkey: "xpra\shell\open\command"; ValueType: "string"; ValueData: """{app}\Xpra.exe"" ""attach"" ""%1"""

Root: HKCR; Subkey: "xpras"; ValueType: "string"; ValueData: "URL:Custom Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "xpras"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "xpras\DefaultIcon"; ValueType: "string"; ValueData: "{app}\Xpra.exe,0"
Root: HKCR; Subkey: "xpras\shell\open\command"; ValueType: "string"; ValueData: """{app}\Xpra.exe"" ""attach"" ""%1"""

[Code]
function IsAppRunning(const FileName : string): Boolean;
var
Expand Down
2 changes: 1 addition & 1 deletion src/xdg/xpra.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ NoDisplay=true
Type=Application
StartupNotify=false
Categories=Network;
MimeType=x-scheme-handler/xpra;
MimeType=x-scheme-handler/xpra;x-scheme-handler/xpras;
4 changes: 3 additions & 1 deletion src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,11 +874,13 @@ def ignore(defaults):

#special handling for URL mode:
#xpra attach xpra://[mode:]host:port/?param1=value1&param2=value2
if len(args)==2 and args[0]=="attach" and args[1].startswith("xpra://"):
if len(args)==2 and args[0]=="attach" and args[1].startswith("xpra://") or args[1].startswith("xpras://"):
url = args[1]
address, params = parse_URL(url)
for k,v in params.items():
setattr(options, k, v)
if url.startswith("xpras://tcp"):
address = "ssl" + address[3:]
args[1] = address

try:
Expand Down

0 comments on commit a72a90e

Please sign in to comment.