[Ttssh2-commit] [5799] X11転送の転送先指定方法を / ssh-X オプションに変更した。

svnno****@sourc***** svnno****@sourc*****
2015年 2月 26日 (木) 00:50:33 JST


Revision: 5799
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5799
Author:   doda
Date:     2015-02-26 00:50:25 +0900 (Thu, 26 Feb 2015)
Log Message:
-----------
X11転送の転送先指定方法を /ssh-X オプションに変更した。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/en/html/commandline/ttssh.html
    trunk/doc/ja/html/about/history.html
    trunk/doc/ja/html/commandline/ttssh.html
    trunk/installer/release/TERATERM.INI
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/doc/en/html/about/history.html	2015-02-25 15:50:25 UTC (rev 5799)
@@ -2552,6 +2552,7 @@
   <li>Changes
     <ul>
       <li>When the private key is saved on the SSH key generator dialog, the round number of the bcrypt KDF can be specified.</li>
+      <!-- li>X11\x93]\x91\x97\x82\xF0\x8Ew\x92肷\x82\xE9\x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93 <a href="../commandline/ttssh.html#ssh-x">/ssh-X</a> \x82ŁA\x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li -->
     </ul>
   </li>
 

Modified: trunk/doc/en/html/commandline/ttssh.html
===================================================================
--- trunk/doc/en/html/commandline/ttssh.html	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/doc/en/html/commandline/ttssh.html	2015-02-25 15:50:25 UTC (rev 5799)
@@ -113,8 +113,18 @@
       if &lt;listen_addr&gt; is omitted, it listens at localhost.<br>
       &lt;listen_addr&gt; is not used with SSH1 protocol.</dd>
 
-  <dt id="ssh-x">/ssh-X</dt>
-  <dd>X11 port-fowarding</dd>
+  <dt id="ssh-x">/ssh-X[[&lt;host&gt;]:&lt;display&gt;[.&lt;screen&gt;]]</dt>
+  <dd>enable X11 fowarding<br>
+  <!--
+    \x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92肵\x82\xBD\x8Fꍇ\x82͂\xBB\x82̓]\x91\x97\x90\xE6\x82\xD6X11\x90ڑ\xB1\x82\xF0\x93]\x91\x97\x82\xB7\x82\xE9<br>
+    \x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92肵\x82Ȃ\xA9\x82\xC1\x82\xBD\x8Fꍇ\x82͈ȉ\xBA\x82̗D\x90揇\x88ʂœ]\x91\x97\x90悪\x8C\x88\x92肳\x82\xEA\x82\xE9\x81B
+    <ol>
+      <li>\x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82\xCC [TTSSH] \x83Z\x83N\x83V\x83\x87\x83\x93\x82\xCC X11Display \x90ݒ\xE8</li>
+      <li>\x8A‹\xAB\x95ϐ\x94 DISPLAY \x82̒l</li>
+      <li>localhost:0.0</li>
+    </ol>
+  -->
+  </dd>
 
   <dt id="ssh-noagent">/ssh-A</dt>
   <dd>enable agent forwarding</dd>
@@ -164,6 +174,7 @@
 <pre>
 ttermpro.exe server1:22 /ssh /ssh-L30025:smtpsrv1:25 /ssh-L30110:pop3srv1:110
 ttermpro.exe server2:22 /ssh /ssh-X
+ttermpro.exe server2:22 /ssh /ssh-Xlocalhost:3.0
 ttermpro.exe server3:22 /ssh /2 /auth=password /user=guest /passwd=guest
 ttermpro.exe server4:22 /ssh /2 /auth=publickey /user=admin /keyfile=pathofkeyfile /ask4passwd
 ttermpro.exe ssh://user:password@server5/ /auth=password

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/doc/ja/html/about/history.html	2015-02-25 15:50:25 UTC (rev 5799)
@@ -2557,6 +2557,7 @@
   <li>\x95ύX
     <ul>
       <li>SSH \x8C\xAE\x90\xB6\x90\xAC\x83_\x83C\x83A\x83\x8D\x83O\x82Ŕ閧\x8C\xAE\x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x82Ƃ\xAB\x81Abcrypt KDF \x82̃\x89\x83E\x83\x93\x83h\x90\x94\x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD</li>
+      <li>X11\x93]\x91\x97\x82\xF0\x8Ew\x92肷\x82\xE9\x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93 <a href="../commandline/ttssh.html#ssh-x">/ssh-X</a> \x82ŁA\x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/commandline/ttssh.html
===================================================================
--- trunk/doc/ja/html/commandline/ttssh.html	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/doc/ja/html/commandline/ttssh.html	2015-02-25 15:50:25 UTC (rev 5799)
@@ -113,8 +113,16 @@
       &lt;listen_addr&gt;\x82\xF0\x8Fȗ\xAA\x82\xB7\x82\xE9\x82ƁAlocalhost\x82Ń\x8A\x83b\x83X\x83\x93\x82\xB7\x82\xE9<br>
       SSH1\x83v\x83\x8D\x83g\x83R\x83\x8B\x82ł\xCD&lt;listen_addr&gt;\x82͗\x98\x97p\x82\xB3\x82\xEA\x82Ȃ\xA2</dd>
 
-  <dt id="ssh-x">/ssh-X</dt>
-  <dd>X11\x82\xF0\x83|\x81[\x83g\x83t\x83H\x83\x8F\x81[\x83f\x83B\x83\x93\x83O\x82\xB7\x82\xE9</dd>
+  <dt id="ssh-x">/ssh-X[[&lt;host&gt;]:&lt;display&gt;[.&lt;screen&gt;]]</dt>
+  <dd>X11\x93]\x91\x97\x82\xF0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9<br>
+    \x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92肵\x82\xBD\x8Fꍇ\x82͂\xBB\x82̓]\x91\x97\x90\xE6\x82\xD6X11\x90ڑ\xB1\x82\xF0\x93]\x91\x97\x82\xB7\x82\xE9<br>
+    \x93]\x91\x97\x90\xE6\x82\xF0\x8Ew\x92肵\x82Ȃ\xA9\x82\xC1\x82\xBD\x8Fꍇ\x82͈ȉ\xBA\x82̗D\x90揇\x88ʂœ]\x91\x97\x90悪\x8C\x88\x92肳\x82\xEA\x82\xE9\x81B
+    <ol>
+      <li>\x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82\xCC [TTSSH] \x83Z\x83N\x83V\x83\x87\x83\x93\x82\xCC X11Display \x90ݒ\xE8</li>
+      <li>\x8A‹\xAB\x95ϐ\x94 DISPLAY \x82̒l</li>
+      <li>localhost:0.0</li>
+    </ol>
+  </dd>
 
   <dt id="ssh-noagent">/ssh-A</dt>
   <dd>\x83G\x81[\x83W\x83F\x83\x93\x83g\x93]\x91\x97\x82\xF0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9</dd>
@@ -164,6 +172,7 @@
 <pre>
 ttermpro.exe server1:22 /ssh /ssh-L30025:smtpsrv1:25 /ssh-L30110:pop3srv1:110
 ttermpro.exe server2:22 /ssh /ssh-X
+ttermpro.exe server2:22 /ssh /ssh-Xlocalhost:3.0
 ttermpro.exe server3:22 /ssh /2 /auth=password /user=guest /passwd=guest
 ttermpro.exe server4:22 /ssh /2 /auth=publickey /user=admin /keyfile=pathofkeyfile /ask4passwd
 ttermpro.exe ssh://user:password@server5/ /auth=password

Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/installer/release/TERATERM.INI	2015-02-25 15:50:25 UTC (rev 5799)
@@ -827,6 +827,8 @@
 ;  1 ... Sending forwarded data to a local port
 DisablePopupMessage=0
 
+; X11 Forwarding
+X11Display=
 
 [TTProxy]
 ConnectionTimeout="10"

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2015-02-23 22:58:51 UTC (rev 5798)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2015-02-25 15:50:25 UTC (rev 5799)
@@ -1636,6 +1636,22 @@
 	return;
 }
 
+void add_forward_param(PTInstVar pvar, char *param)
+{
+	if (pvar->settings.DefaultForwarding[0] == 0) {
+		strncpy_s(pvar->settings.DefaultForwarding,
+		          sizeof(pvar->settings.DefaultForwarding),
+		          param, _TRUNCATE);
+	} else {
+		strncat_s(pvar->settings.DefaultForwarding,
+		          sizeof(pvar->settings.DefaultForwarding),
+		          ";", _TRUNCATE);
+		strncat_s(pvar->settings.DefaultForwarding,
+		          sizeof(pvar->settings.DefaultForwarding),
+		          param, _TRUNCATE);
+	}
+}
+
 /* returns 1 if the option text must be deleted */
 static int parse_option(PTInstVar pvar, char FAR * option)
 {
@@ -1646,22 +1662,12 @@
 			} else if (MATCH_STR(option + 4, "-L") == 0 ||
 			           MATCH_STR(option + 4, "-R") == 0 ||
 			           _stricmp(option + 4, "-X") == 0) {
-				if (pvar->settings.DefaultForwarding[0] == 0) {
-					strncpy_s(pvar->settings.DefaultForwarding,
-					          sizeof(pvar->settings.DefaultForwarding),
-					          option + 5, _TRUNCATE);
-				} else {
-					strncat_s(pvar->settings.DefaultForwarding,
-					          sizeof(pvar->settings.DefaultForwarding),
-					          ";", _TRUNCATE);
-					strncat_s(pvar->settings.DefaultForwarding,
-					          sizeof(pvar->settings.DefaultForwarding),
-					          option + 5, _TRUNCATE);
-				}
-			} else if (MATCH_STR(option + 4, "-display=") == 0) {
+				add_forward_param(pvar, option+5);
+			} else if (MATCH_STR(option + 4, "-X") == 0) {
+				add_forward_param(pvar, "X");
 				strncpy_s(pvar->settings.X11Display,
 				          sizeof(pvar->settings.X11Display),
-				          option + 13, _TRUNCATE);
+				          option + 6, _TRUNCATE);
 			} else if (MATCH_STR(option + 4, "-f=") == 0) {
 				read_ssh_options_from_user_file(pvar, option + 7);
 			} else if (MATCH_STR(option + 4, "-v") == 0) {



Ttssh2-commit メーリングリストの案内