[Ttssh2-commit] [6849] Dynamic Forwarding (SOCKS Proxy)

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2017年 7月 7日 (金) 06:53:55 JST


Revision: 6849
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6849
Author:   maya
Date:     2017-07-07 06:53:55 +0900 (Fri, 07 Jul 2017)
Log Message:
-----------
Dynamic Forwarding (SOCKS Proxy)

SSH Port Forwarding ダイアログでの設定変更に対応
Listen Address が効かないのを修正
i18n メッセージファイルに追記

Modified Paths:
--------------
    trunk/installer/release/lang/English.lng
    trunk/installer/release/lang/French.lng
    trunk/installer/release/lang/German.lng
    trunk/installer/release/lang/Japanese.lng
    trunk/installer/release/lang/Korean.lng
    trunk/installer/release/lang/Russian.lng
    trunk/installer/release/lang/Simplified Chinese.lng
    trunk/installer/release/lang/Traditional Chinese.lng
    trunk/ttssh2/ttxssh/fwdui.c
    trunk/ttssh2/ttxssh/resource.h
    trunk/ttssh2/ttxssh/ttxssh.rc

-------------- next part --------------
Modified: trunk/installer/release/lang/English.lng
===================================================================
--- trunk/installer/release/lang/English.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/English.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -613,6 +613,8 @@
 DLG_FWD_REMOTE_LISTEN=li&sten
 DLG_FWD_REMOTE_LOCAL=to local m&achine
 DLG_FWD_REMOTE_LOCAL_PORT=p&ort
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=You cannot have two forwarding from the same server port (%d).
 MSG_SAME_LOCALPORT_ERROR=You cannot have two forwarding from the same local port (%d).
@@ -635,6 +637,7 @@
 MSG_FWD_REMOTE=Remote "%s" port %s to local "%s" port %s
 MSG_FWD_LOCAL=Local "%s" port %s to remote "%s" port %s
 MSG_FWD_X=Remote X applications to local X server
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term: New connection

Modified: trunk/installer/release/lang/French.lng
===================================================================
--- trunk/installer/release/lang/French.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/French.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (French language) by Francois MOCQ (2010-07-21)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=Ecouter
 DLG_FWD_REMOTE_LOCAL=vers machine locale
 DLG_FWD_REMOTE_LOCAL_PORT=p&ort
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=Vous ne pouvez pas avoir deux mappages sur le m\xEAme port de serveur (%d).
 MSG_SAME_LOCALPORT_ERROR=Vous ne pouvez pas avoir deux mappages sur le m\xEAme port local (%d).
@@ -630,6 +632,7 @@
 DLG_FWDSETUP_CHECKIDENTITY=Les ports locaux a&cceptent des connexions des autres h\xF4tes
 DLG_FWDSETUP_X=X Mappage
 DLG_FWDSETUP_XAPP=Afficher les applis distantes sur les serveur X local
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 MSG_FWD_REMOTE_XSERVER=serveur X distant
 MSG_FWD_REMOTE_XSCREEN=serveur X (display %d:%d)

Modified: trunk/installer/release/lang/German.lng
===================================================================
--- trunk/installer/release/lang/German.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/German.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (German language) by Frederik Schwarzer (2010-05-17)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=li&sten
 DLG_FWD_REMOTE_LOCAL=zur lokalen Maschine
 DLG_FWD_REMOTE_LOCAL_PORT=Lok. Port
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=Sie k\xF6nnen nicht zwei Weiterleitungen vom selben Server-Port definieren (%d).
 MSG_SAME_LOCALPORT_ERROR=Sie k\xF6nnen nicht zwei Weiterleitungen vom selben lokalen Port definieren (%d).
@@ -636,6 +638,7 @@
 MSG_FWD_REMOTE=Remote "%s" port %s to local "%s" port %s
 MSG_FWD_LOCAL=Local "%s" port %s to remote "%s" port %s
 MSG_FWD_X=Remote X applications to local X server
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Neue Verbindung

Modified: trunk/installer/release/lang/Japanese.lng
===================================================================
--- trunk/installer/release/lang/Japanese.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/Japanese.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 
 [Tera Term]
 DLG_SYSTEM_FONT=\x82l\x82r \x82o\x83S\x83V\x83b\x83N,12,128
@@ -613,6 +613,8 @@
 DLG_FWD_REMOTE_LISTEN=\x83\x8A\x83b\x83X\x83\x93(&S)
 DLG_FWD_REMOTE_LOCAL=\x83\x8D\x81[\x83J\x83\x8B\x91\xA4\x83z\x83X\x83g(&A)
 DLG_FWD_REMOTE_LOCAL_PORT=\x83|\x81[\x83g(&O)
+DLG_FWD_DYNAMIC_PORT=\x83_\x83C\x83i\x83~\x83b\x83N\x83|\x81[\x83g(&D)
+DLG_FWD_DYNAMIC_LISTEN=\x83\x8A\x83b\x83X\x83\x93(&T)
 
 MSG_SAME_SERVERPORT_ERROR=\x93\xAF\x88ꃊ\x83\x82\x81[\x83g\x83|\x81[\x83g\x82\xC9 2\x82ˆȏ\xE3\x82̓]\x91\x97\x82͐ݒ\xE8\x82ł\xAB\x82܂\xB9\x82\xF1 (%d).
 MSG_SAME_LOCALPORT_ERROR=\x93\xAF\x88ꃍ\x81[\x83J\x83\x8B\x83|\x81[\x83g\x82\xC9 2\x82ˆȏ\xE3\x82̓]\x91\x97\x82͐ݒ\xE8\x82ł\xAB\x82܂\xB9\x82\xF1 (%d).
@@ -635,6 +637,7 @@
 MSG_FWD_REMOTE=\x83\x8A\x83\x82\x81[\x83g\x82\xCC "%s" \x82̃|\x81[\x83g %s \x82\xA9\x82烍\x81[\x83J\x83\x8B\x91\xA4\x83z\x83X\x83g "%s" \x82̃|\x81[\x83g %s
 MSG_FWD_LOCAL=\x83\x8D\x81[\x83J\x83\x8B\x82\xCC "%s" \x82̃|\x81[\x83g %s \x82\xA9\x82\xE7 \x83\x8A\x83\x82\x81[\x83g\x91\xA4\x83z\x83X\x83g "%s" \x82̃|\x81[\x83g %s
 MSG_FWD_X=\x83\x8A\x83\x82\x81[\x83g\x82\xCCX\x83A\x83v\x83\x8A\x83P\x81[\x83V\x83\x87\x83\x93\x82\xA9\x82烍\x81[\x83J\x83\x8B\x82\xCCX\x83T\x81[\x83o
+MSG_FWD_DYNAMIC=\x83\x8D\x81[\x83J\x83\x8B\x82\xCC "%s" \x82̃|\x81[\x83g %s \x82\xA9\x82烊\x83\x82\x81[\x83g\x91\xA4\x83_\x83C\x83i\x83~\x83b\x83N
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term: \x90V\x82\xB5\x82\xA2\x90ڑ\xB1

Modified: trunk/installer/release/lang/Korean.lng
===================================================================
--- trunk/installer/release/lang/Korean.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/Korean.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (Korean language) by Daehong Kim (2013-07-25)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=\xB5\xE8\xB1\xE2(&S)
 DLG_FWD_REMOTE_LOCAL=\xC1\xF6\xBF\xAA \xC4\xC4ǻ\xC5ͷ\xCE(&A)
 DLG_FWD_REMOTE_LOCAL_PORT=\xC6\xF7Ʈ(&O)
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=\xB0\xB0\xC0\xBA \xBC\xAD\xB9\xF6 \xC6\xF7Ʈ\xB7\xCE \xBA\xCE\xC5\xCD 2\xB0\xB3\xC0\xC7 \xC6\xF7\xBF\xF6\xB5\xF9\xC0\xBB \xC7\xD2 \xBC\xF6 \xBE\xF8\xBD\xC0\xB4ϴ\xD9(%d).
 MSG_SAME_LOCALPORT_ERROR=\xB0\xB0\xC0\xBA \xB7\xCE\xC4\xC3 \xC6\xF7Ʈ\xB7\xCE \xBA\xCE\xC5\xCD 2\xB0\xB3\xC0\xC7 \xC6\xF7\xBF\xF6\xB5\xF9\xC0\xBB \xC7\xD2 \xBC\xF6 \xBE\xF8\xBD\xC0\xB4ϴ\xD9(%d).
@@ -636,6 +638,7 @@
 MSG_FWD_REMOTE=\xBF\xF8\xB0\xDD "%s" \xC6\xF7Ʈ %s\xBF\xA1\xBC\xAD \xC1\xF6\xBF\xAA "%s" \xC6\xF7Ʈ %s\xB7\xCE
 MSG_FWD_LOCAL=\xC1\xF6\xBF\xAA "%s" \xC6\xF7Ʈ %s\xBF\xA1\xBC\xAD \xBF\xF8\xB0\xDD "%s" \xC6\xF7Ʈ %s\xB7\xCE
 MSG_FWD_X=\xC1\xF6\xBF\xAA X \xBC\xAD\xB9\xF6\xBF\xA1 X \xC0\xC0\xBF\xEB\xC7\xC1\xB7α׷\xA5\xC0\xBB \xBF\xAC\xB0\xE1
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term: \xBB\xF5 \xBF\xAC\xB0\xE1

Modified: trunk/installer/release/lang/Russian.lng
===================================================================
--- trunk/installer/release/lang/Russian.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/Russian.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (Russian language) by Ryumik Sergey (2015-03-14)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=&\xD1\xEB\xF3\xF8\xE0\xF2\xFC
 DLG_FWD_REMOTE_LOCAL=&\xCB\xEE\xEA\xE0\xEB\xFC\xED\xFB\xE9 \xEA\xEE\xEC\xEF\xFC\xFE\xF2\xE5\xF0
 DLG_FWD_REMOTE_LOCAL_PORT=&\xCF\xEE\xF0\xF2
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=\xC2\xFB \xED\xE5 \xEC\xEE\xE6\xE5\xF2\xE5 \xE8\xEC\xE5\xF2\xFC \xE4\xE2\xE0 \xEF\xE5\xF0\xE5\xED\xE0\xEF\xF0\xE0\xE2\xEB\xE5\xED\xE8\xFF \xE8\xE7 \xEE\xE4\xED\xEE\xE3\xEE \xE8 \xF2\xEE\xE3\xEE \xE6\xE5 \xEF\xEE\xF0\xF2\xE0 \xF1\xE5\xF0\xE2\xE5\xF0\xE0 (%d).
 MSG_SAME_LOCALPORT_ERROR=\xC2\xFB \xED\xE5 \xEC\xEE\xE6\xE5\xF2\xE5 \xE8\xEC\xE5\xF2\xFC \xE4\xE2\xE0 \xEF\xE5\xF0\xE5\xED\xE0\xEF\xF0\xE0\xE2\xEB\xE5\xED\xE8\xE5 \xE8\xE7 \xEE\xE4\xED\xEE\xE3\xEE \xE8 \xF2\xEE\xE3\xEE \xE6\xE5 \xEF\xEE\xF0\xF2\xE0 (%d).
@@ -636,6 +638,7 @@
 MSG_FWD_REMOTE=\xD3\xE4\xE0\xEB\xE5\xED\xED\xFB\xE9 "%s" \xEF\xEE\xF0\xF2 %s \xE2 \xEB\xEE\xEA\xE0\xEB\xFC\xED\xFB\xE9 "%s" \xEF\xEE\xF0\xF2 %s
 MSG_FWD_LOCAL=\xCB\xEE\xEA\xE0\xEB\xFC\xED\xFB\xE9 "%s" \xEF\xEE\xF0\xF2 %s \xE2 \xF3\xE4\xE0\xEB\xE5\xED\xED\xFB\xE9 "%s" \xEF\xEE\xF0\xF2 %s
 MSG_FWD_X=\xF3\xE4\xE0\xEB\xE5\xED\xED\xFB\xE5 \xEF\xF0\xE8\xEB\xEE\xE6\xE5\xED\xE8\xFF X \xED\xE0 \xEB\xEE\xEA\xE0\xEB\xFC\xED\xFB\xE9 X-\xF1\xE5\xF0\xE2\xE5\xF0
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term: \xCD\xEE\xE2\xEE\xE5 \xF1\xEE\xE5\xE4\xE8\xED\xE5\xED\xE8\xE5

Modified: trunk/installer/release/lang/Simplified Chinese.lng
===================================================================
--- trunk/installer/release/lang/Simplified Chinese.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/Simplified Chinese.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (Simplified Chinese language) by LiShaohui (2017-04-11)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=\xD5\xEC\xCC\xFD(&S)
 DLG_FWD_REMOTE_LOCAL=\xB5\xBD\xB1\xBE\xB5\xD8\xC9豸(&A)
 DLG_FWD_REMOTE_LOCAL_PORT=\xB6˿\xDA(&O)
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=\xB2\xBB\xC4\xDC\xD4\xDAͬһԶ\xB3̶˿\xDA\xC9\xE8\xD6\xC3\xC1\xBD\xB8\xF6\xBB\xF2\xB8\xFC\xB6\xE0\xB5\xC4ת\xB7\xA2 (%d).
 MSG_SAME_LOCALPORT_ERROR=\xB2\xBB\xC4\xDC\xD4\xDAͬһ\xB1\xBE\xB5ض˿\xDA\xC9\xE8\xD6\xC3\xC1\xBD\xB8\xF6\xBB\xF2\xB8\xFC\xB6\xE0\xB5\xC4ת\xB7\xA2 (%d).
@@ -636,6 +638,7 @@
 MSG_FWD_REMOTE=Զ\xB3̡\xB0%s\xA1\xB1\xB6˿\xDA%s\xB5\xBD\xB1\xBE\xB5ء\xB0%s\xA1\xB1\xB6˿\xDA%s
 MSG_FWD_LOCAL=\xB1\xBE\xB5ء\xB0%s\xA1\xB1\xB6˿\xDA%s\xB5\xBDԶ\xB3̡\xB0%s\xA1\xB1\xB6˿\xDA%s
 MSG_FWD_X=Զ\xB3\xCCXӦ\xD3ó\xCC\xD0򵽱\xBE\xB5\xD8X\xB7\xFE\xCE\xF1\xC6\xF7
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term\xA3\xBA\xD0½\xA8\xC1\xAC\xBD\xD3

Modified: trunk/installer/release/lang/Traditional Chinese.lng
===================================================================
--- trunk/installer/release/lang/Traditional Chinese.lng	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/installer/release/lang/Traditional Chinese.lng	2017-07-06 21:53:55 UTC (rev 6849)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2017-06-06)
+; Updated by TeraTerm Project (2017-07-07)
 ; Last translated (Traditional Chinese language) by kikiqqp (2014-09-20)
 
 [Tera Term]
@@ -614,6 +614,8 @@
 DLG_FWD_REMOTE_LISTEN=\xB0\xBBť(&S)
 DLG_FWD_REMOTE_LOCAL=\xA8쥻\xA6a\xB3]\xB3\xC6(&A)
 DLG_FWD_REMOTE_LOCAL_PORT=\xBAݤf(&O)
+DLG_FWD_DYNAMIC_PORT=Forward &dynamic port
+DLG_FWD_DYNAMIC_LISTEN=lis&ten
 
 MSG_SAME_SERVERPORT_ERROR=\xA4\xA3\xAF\xE0\xA6b\xA6P\xA4@\xBB\xB7\xBAݺݤf\xB3]\xA9w\xA8\xE2\xADөΧ\xF3\xA6h\xAA\xBA\xB3s\xBDu (%d).
 MSG_SAME_LOCALPORT_ERROR=\xA4\xA3\xAF\xE0\xA6b\xA6P\xA4@\xA5\xBB\xA6a\xBAݤf\xB3]\xA9w\xA8\xE2\xADөΧ\xF3\xA6h\xAA\xBA\xB3s\xBDu (%d).
@@ -636,6 +638,7 @@
 MSG_FWD_REMOTE=\xBB\xB7\xBAݡu%s\xA1v\xBAݤf%s\xA8쥻\xA6a\xA1u%s\xA1v\xBAݤf%s
 MSG_FWD_LOCAL=\xA5\xBB\xA6a\xA1u%s\xA1v\xBAݤf%s\xA8컷\xBAݡu%s\xA1v\xBAݤf%s
 MSG_FWD_X=\xBB\xB7\xBA\xDDX\xC0\xB3\xA5ε{\xA6\xA1\xA8쥻\xA6aX\xA6\xF8\xAAA\xBE\xB9
+MSG_FWD_DYNAMIC=Local "%s" port %s to remote dynamic
 
 ; dlg host
 DLG_HOST_TITLE=Tera Term\xA1G\xABإ߷s\xB3s\xBDu

Modified: trunk/ttssh2/ttxssh/fwdui.c
===================================================================
--- trunk/ttssh2/ttxssh/fwdui.c	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/ttssh2/ttxssh/fwdui.c	2017-07-06 21:53:55 UTC (rev 6849)
@@ -700,7 +700,8 @@
 				_snprintf_s(str, str_remaining, _TRUNCATE, "X");
 				break;
 			case FWD_LOCAL_DYNAMIC:
-				_snprintf_s(str, str_remaining, _TRUNCATE, "D%s", spec->from_port_name);
+				_snprintf_s(str, str_remaining, _TRUNCATE, "D%s:%s",
+				            spec->bind_address, spec->from_port_name);
 			}
 
 			chars = strlen(str);
@@ -808,16 +809,18 @@
 		                  "Local \"%s\" port %s to remote \"%s\" port %s");
 		_snprintf_s(buf, bufsize, _TRUNCATE, pvar->ts->UIMsg,
 		            spec->bind_address, verbose_from_port,
-		            spec->to_host,verbose_to_port);
+		            spec->to_host, verbose_to_port);
 		break;
 	case FWD_REMOTE_X11_TO_LOCAL:
 		UTIL_get_lang_msg("MSG_FWD_X", pvar,
 		                  "Remote X applications to local X server");
 		strncpy_s(buf, bufsize, pvar->ts->UIMsg, _TRUNCATE);
-		return;
+		break;
 	case FWD_LOCAL_DYNAMIC:
-		UTIL_get_lang_msg("MSG_FWD_DYNAMIC", pvar, "Local port %s to remote dynamic");
-		_snprintf_s(buf, bufsize, _TRUNCATE, pvar->ts->UIMsg, verbose_from_port);
+		UTIL_get_lang_msg("MSG_FWD_DYNAMIC", pvar, "Local \"%s\" port %s to remote dynamic");
+		_snprintf_s(buf, bufsize, _TRUNCATE, pvar->ts->UIMsg,
+		            spec->bind_address, verbose_from_port);
+		break;
 	}
 }
 
@@ -1032,24 +1035,72 @@
 	}
 }
 
-static void shift_over_input(HWND dlg, FWDType type, WORD rtl_item,
-							 WORD ltr_item)
+static void init_input(HWND dlg, FWDType type_to)
 {
-	HWND shift_from;
-	HWND shift_to;
+	HWND dlg_item;
 
-	if (type == FWD_REMOTE_TO_LOCAL) {
+	if (type_to == FWD_REMOTE_TO_LOCAL || type_to == FWD_LOCAL_DYNAMIC) {
+		dlg_item = GetDlgItem(dlg, IDC_SSHLTRFROMPORT);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHLTRLISTENADDR);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHLTRTOHOST);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHLTRTOPORT);
+		EnableWindow(dlg_item, FALSE);
+	}
+	if (type_to == FWD_LOCAL_TO_REMOTE || type_to == FWD_LOCAL_DYNAMIC) {
+		dlg_item = GetDlgItem(dlg, IDC_SSHRTLFROMPORT);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHRTLLISTENADDR);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHRTLTOHOST);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHRTLTOPORT);
+		EnableWindow(dlg_item, FALSE);
+	}
+	if (type_to == FWD_REMOTE_TO_LOCAL || type_to == FWD_LOCAL_TO_REMOTE) {
+		dlg_item = GetDlgItem(dlg, IDC_SSHDYNFROMPORT);
+		EnableWindow(dlg_item, FALSE);
+		dlg_item = GetDlgItem(dlg, IDC_SSHDYNLISTENADDR);
+		EnableWindow(dlg_item, FALSE);
+	}
+}
+
+static void shift_over_input(HWND dlg, FWDType type_from, FWDType type_to,
+                             WORD rtl_item, WORD ltr_item, WORD dyn_item)
+{
+	HWND shift_from = NULL;
+	HWND shift_to = NULL;
+
+	if (type_from == FWD_LOCAL_TO_REMOTE ) {
 		shift_from = GetDlgItem(dlg, ltr_item);
-		shift_to = GetDlgItem(dlg, rtl_item);
-	} else {
+	}
+	else if (type_from == FWD_REMOTE_TO_LOCAL) {
 		shift_from = GetDlgItem(dlg, rtl_item);
+	}
+	else if (type_from == FWD_LOCAL_DYNAMIC && dyn_item != 0) {
+		shift_from = GetDlgItem(dlg, dyn_item);
+	}
+
+	if (type_to == FWD_LOCAL_TO_REMOTE ) {
 		shift_to = GetDlgItem(dlg, ltr_item);
 	}
+	else if (type_to == FWD_REMOTE_TO_LOCAL) {
+		shift_to = GetDlgItem(dlg, rtl_item);
+	}
+	else if (type_to == FWD_LOCAL_DYNAMIC && dyn_item != 0) {
+		shift_to = GetDlgItem(dlg, dyn_item);
+	}
 
-	EnableWindow(shift_from, FALSE);
-	EnableWindow(shift_to, TRUE);
+	if (shift_from != 0) {
+		EnableWindow(shift_from, FALSE);
+	}
+	if (shift_to != 0) {
+		EnableWindow(shift_to, TRUE);
+	}
 
-	if (GetWindowTextLength(shift_to) == 0) {
+	if (shift_from != 0 && shift_to != 0 && GetWindowTextLength(shift_to) == 0) {
 		char buf[128];
 
 		GetWindowText(shift_from, buf, sizeof(buf));
@@ -1061,13 +1112,40 @@
 
 static void set_dir_options_status(HWND dlg)
 {
-	FWDType type = IsDlgButtonChecked(dlg, IDC_SSHFWDREMOTETOLOCAL)
-		? FWD_REMOTE_TO_LOCAL : FWD_LOCAL_TO_REMOTE;
+	FWDType type_to, type_from;
+	BOOL enable_LTR, enable_RTL, enable_DYN;
+	
+	type_to = FWD_REMOTE_TO_LOCAL;
+	if (IsDlgButtonChecked(dlg, IDC_SSHFWDLOCALTOREMOTE)) {
+		type_to = FWD_LOCAL_TO_REMOTE;
+	}
+	if (IsDlgButtonChecked(dlg, IDC_SSHFWDLOCALDYNAMIC)) {
+		type_to = FWD_LOCAL_DYNAMIC;
+	}
 
-	shift_over_input(dlg, type, IDC_SSHRTLFROMPORT, IDC_SSHLTRFROMPORT);
-	shift_over_input(dlg, type, IDC_SSHRTLLISTENADDR, IDC_SSHLTRLISTENADDR);
-	shift_over_input(dlg, type, IDC_SSHRTLTOHOST, IDC_SSHLTRTOHOST);
-	shift_over_input(dlg, type, IDC_SSHRTLTOPORT, IDC_SSHLTRTOPORT);
+	enable_LTR = IsWindowEnabled(GetDlgItem(dlg, IDC_SSHLTRFROMPORT));
+	enable_RTL = IsWindowEnabled(GetDlgItem(dlg, IDC_SSHRTLFROMPORT));
+	enable_DYN = IsWindowEnabled(GetDlgItem(dlg, IDC_SSHDYNFROMPORT));
+	type_from = FWD_NONE; // \x83_\x83C\x83A\x83\x8D\x83O\x95\\x8E\xA6\x8E\x9E\x82ɂ͂\xB7\x82ׂ\xC4Enable\x8F\xF3\x91\xD4
+	if (enable_LTR && !enable_RTL && !enable_DYN) {
+		type_from = FWD_LOCAL_TO_REMOTE;
+	}
+	else if (!enable_LTR && enable_RTL && !enable_DYN) {
+		type_from = FWD_REMOTE_TO_LOCAL;
+	}
+	else if (!enable_LTR && !enable_RTL && enable_DYN) {
+		type_from = FWD_LOCAL_DYNAMIC;
+	}
+
+	if (type_from == FWD_NONE) {
+		init_input(dlg, type_to);
+	}
+	else {
+		shift_over_input(dlg, type_from, type_to, IDC_SSHRTLFROMPORT, IDC_SSHLTRFROMPORT, IDC_SSHDYNFROMPORT);
+		shift_over_input(dlg, type_from, type_to, IDC_SSHRTLLISTENADDR, IDC_SSHLTRLISTENADDR, IDC_SSHDYNLISTENADDR);
+		shift_over_input(dlg, type_from, type_to, IDC_SSHRTLTOHOST, IDC_SSHLTRTOHOST, 0);
+		shift_over_input(dlg, type_from, type_to, IDC_SSHRTLTOPORT, IDC_SSHLTRTOPORT, 0);
+	}
 }
 
 static void setup_edit_controls(HWND dlg, FWDRequestSpec *spec,
@@ -1078,8 +1156,10 @@
 	CheckDlgButton(dlg, radio_item, TRUE);
 	SetFocus(GetDlgItem(dlg, radio_item));
 	SetDlgItemText(dlg, from_port_item, spec->from_port_name);
-	SetDlgItemText(dlg, to_port_item, spec->to_port_name);
-	if (strcmp(spec->to_host, "localhost") != 0) {
+	if (to_port_item != 0) {
+		SetDlgItemText(dlg, to_port_item, spec->to_port_name);
+	}
+	if (to_host_item != 0 && strcmp(spec->to_host, "localhost") != 0) {
 		SetDlgItemText(dlg, to_host_item, spec->to_host);
 	}
 	if (strcmp(spec->bind_address, "localhost") != 0) {
@@ -1123,6 +1203,12 @@
 	GetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, uimsg, sizeof(uimsg));
 	UTIL_get_lang_msg("DLG_FWD_REMOTE_LOCAL_PORT", pvar, uimsg);
 	SetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, pvar->ts->UIMsg);
+	GetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC, uimsg, sizeof(uimsg));
+	UTIL_get_lang_msg("DLG_FWD_DYNAMIC_PORT", pvar, uimsg);
+	SetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC, pvar->ts->UIMsg);
+	GetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC_LISTEN, uimsg, sizeof(uimsg));
+	UTIL_get_lang_msg("DLG_FWD_DYNAMIC_LISTEN", pvar, uimsg);
+	SetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC_LISTEN, pvar->ts->UIMsg);
 	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
 	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
 	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
@@ -1141,6 +1227,11 @@
 		                    IDC_SSHLTRFROMPORT, IDC_SSHLTRLISTENADDR,
 		                    IDC_SSHLTRTOHOST, IDC_SSHLTRTOPORT);
 		break;
+	case FWD_LOCAL_DYNAMIC:
+		setup_edit_controls(dlg, spec, IDC_SSHFWDLOCALDYNAMIC,
+		                    IDC_SSHDYNFROMPORT, IDC_SSHDYNLISTENADDR,
+		                    0, 0);
+		break;
 	}
 
 	fill_service_names(dlg, IDC_SSHRTLFROMPORT);
@@ -1147,29 +1238,46 @@
 	fill_service_names(dlg, IDC_SSHLTRFROMPORT);
 	fill_service_names(dlg, IDC_SSHRTLTOPORT);
 	fill_service_names(dlg, IDC_SSHLTRTOPORT);
+	fill_service_names(dlg, IDC_SSHDYNFROMPORT);
 }
 
-static void grab_control_text(HWND dlg, FWDType type, WORD rtl_item,
-                              WORD ltr_item, char *buf, int bufsize)
+static void grab_control_text(HWND dlg, FWDType type,
+                              WORD rtl_item, WORD ltr_item, WORD dyn_item,
+                              char *buf, int bufsize)
 {
-	GetDlgItemText(dlg, type == FWD_REMOTE_TO_LOCAL ? rtl_item : ltr_item,
-	               buf, bufsize);
+	WORD dlg_item = ltr_item;
+	if (type == FWD_REMOTE_TO_LOCAL) {
+		dlg_item = rtl_item;
+	}
+	else if (type == FWD_LOCAL_DYNAMIC) {
+		dlg_item = dyn_item;
+	}
+
+	GetDlgItemText(dlg, dlg_item, buf, bufsize);
 	buf[bufsize - 1] = 0;
 }
 
-static BOOL end_fwd_edit_dlg(PTInstVar pvar, FWDRequestSpec *spec,
-                             HWND dlg)
+static BOOL end_fwd_edit_dlg(PTInstVar pvar, FWDRequestSpec *spec, HWND dlg)
 {
 	FWDRequestSpec new_spec;
-	FWDType type = IsDlgButtonChecked(dlg, IDC_SSHFWDREMOTETOLOCAL)
-		? FWD_REMOTE_TO_LOCAL : FWD_LOCAL_TO_REMOTE;
+	FWDType type;
 	char buf[1024];
 
+	type = FWD_LOCAL_TO_REMOTE;
+	if (IsDlgButtonChecked(dlg, IDC_SSHFWDREMOTETOLOCAL)) {
+		type = FWD_REMOTE_TO_LOCAL;
+	}
+	else if (IsDlgButtonChecked(dlg, IDC_SSHFWDLOCALDYNAMIC)) {
+		type = FWD_LOCAL_DYNAMIC;
+	}
 	new_spec.type = type;
-	grab_control_text(dlg, type, IDC_SSHRTLFROMPORT, IDC_SSHLTRFROMPORT,
-	                  new_spec.from_port_name,
-	                  sizeof(new_spec.from_port_name));
-	grab_control_text(dlg, type, IDC_SSHRTLLISTENADDR, IDC_SSHLTRLISTENADDR,
+
+	grab_control_text(dlg, type,
+	                  IDC_SSHRTLFROMPORT, IDC_SSHLTRFROMPORT, IDC_SSHDYNFROMPORT,
+	                  new_spec.from_port_name, sizeof(new_spec.from_port_name));
+
+	grab_control_text(dlg, type,
+	                  IDC_SSHRTLLISTENADDR, IDC_SSHLTRLISTENADDR, IDC_SSHDYNLISTENADDR,
 	                  new_spec.bind_address, sizeof(new_spec.bind_address));
 	if (new_spec.bind_address[0] == 0) {
 		strncpy_s(new_spec.bind_address, sizeof(new_spec.bind_address), "localhost", _TRUNCATE);
@@ -1186,23 +1294,28 @@
 			memmove(new_spec.bind_address, new_spec.bind_address + 1, strlen(new_spec.bind_address)+1);
 		}
 	}
-	grab_control_text(dlg, type, IDC_SSHRTLTOHOST, IDC_SSHLTRTOHOST,
-	                  new_spec.to_host, sizeof(new_spec.to_host));
-	if (new_spec.to_host[0] == 0) {
-		strncpy_s(new_spec.to_host, sizeof(new_spec.to_host), "localhost", _TRUNCATE);
-	}
-	else {
-		// IPv6 \x83A\x83h\x83\x8C\x83X\x82\xCC "[", "]" \x82\xAA\x82\xA0\x82\xEA\x82΍폜
-		if (new_spec.to_host[strlen(new_spec.to_host)-1] == ']') {
-			new_spec.to_host[strlen(new_spec.to_host)-1] = '\0';
+
+	if (type == FWD_LOCAL_TO_REMOTE || type == FWD_REMOTE_TO_LOCAL) {
+		grab_control_text(dlg, type,
+		                  IDC_SSHRTLTOHOST, IDC_SSHLTRTOHOST, 0,
+		                  new_spec.to_host, sizeof(new_spec.to_host));
+		if (new_spec.to_host[0] == 0) {
+			strncpy_s(new_spec.to_host, sizeof(new_spec.to_host), "localhost", _TRUNCATE);
 		}
-		if (new_spec.to_host[0] == '[') {
-			memmove(new_spec.to_host, new_spec.to_host + 1, strlen(new_spec.to_host)+1);
+		else {
+			// IPv6 \x83A\x83h\x83\x8C\x83X\x82\xCC "[", "]" \x82\xAA\x82\xA0\x82\xEA\x82΍폜
+			if (new_spec.to_host[strlen(new_spec.to_host)-1] == ']') {
+				new_spec.to_host[strlen(new_spec.to_host)-1] = '\0';
+			}
+			if (new_spec.to_host[0] == '[') {
+				memmove(new_spec.to_host, new_spec.to_host + 1, strlen(new_spec.to_host)+1);
+			}
 		}
+
+		grab_control_text(dlg, type,
+		                  IDC_SSHRTLTOPORT, IDC_SSHLTRTOPORT, 0,
+		                  new_spec.to_port_name, sizeof(new_spec.to_port_name));
 	}
-	grab_control_text(dlg, type, IDC_SSHRTLTOPORT, IDC_SSHLTRTOPORT,
-	                  new_spec.to_port_name,
-	                  sizeof(new_spec.to_port_name));
 
 	new_spec.from_port = parse_port_from_buf(new_spec.from_port_name);
 	if (new_spec.from_port < 0) {
@@ -1215,15 +1328,17 @@
 		return FALSE;
 	}
 
-	new_spec.to_port = parse_port_from_buf(new_spec.to_port_name);
-	if (new_spec.to_port < 0) {
-		UTIL_get_lang_msg("MSG_INVALID_PORT_ERROR", pvar,
-		                  "Port \"%s\" is not a valid port number.\n"
-		                  "Either choose a port name from the list, or enter a number between 1 and 65535.");
-		_snprintf_s(buf, sizeof(buf), _TRUNCATE,
-		            pvar->ts->UIMsg, new_spec.to_port_name);
-		notify_nonfatal_error(pvar, buf);
-		return FALSE;
+	if (type == FWD_LOCAL_TO_REMOTE || type == FWD_REMOTE_TO_LOCAL) {
+		new_spec.to_port = parse_port_from_buf(new_spec.to_port_name);
+		if (new_spec.to_port < 0) {
+			UTIL_get_lang_msg("MSG_INVALID_PORT_ERROR", pvar,
+			                  "Port \"%s\" is not a valid port number.\n"
+			                  "Either choose a port name from the list, or enter a number between 1 and 65535.");
+			_snprintf_s(buf, sizeof(buf), _TRUNCATE,
+			            pvar->ts->UIMsg, new_spec.to_port_name);
+			notify_nonfatal_error(pvar, buf);
+			return FALSE;
+		}
 	}
 
 	*spec = new_spec;
@@ -1254,19 +1369,25 @@
 		if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgFwdEditFont, pvar)) {
 			SendDlgItemMessage(dlg, IDD_SSHFWDBANNER, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
-			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE_HOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
-			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE_PORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
-			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
-			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL_HOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
-			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHLTRFROMPORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE_LISTEN, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHLTRLISTENADDR, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE_HOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHLTRTOHOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALTOREMOTE_PORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHLTRTOPORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHRTLFROMPORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL_LISTEN, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHRTLLISTENADDR, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL_HOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHRTLTOHOST, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDC_SSHRTLTOPORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALDYNAMIC, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHDYNFROMPORT, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHFWDLOCALDYNAMIC_LISTEN, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
+			SendDlgItemMessage(dlg, IDC_SSHDYNLISTENADDR, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDOK, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 			SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgFwdEditFont, MAKELPARAM(TRUE,0));
 		}
@@ -1302,6 +1423,7 @@
 
 		case IDC_SSHFWDLOCALTOREMOTE:
 		case IDC_SSHFWDREMOTETOLOCAL:
+		case IDC_SSHFWDLOCALDYNAMIC:
 			set_dir_options_status(dlg);
 			return TRUE;
 

Modified: trunk/ttssh2/ttxssh/resource.h
===================================================================
--- trunk/ttssh2/ttxssh/resource.h	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/ttssh2/ttxssh/resource.h	2017-07-06 21:53:55 UTC (rev 6849)
@@ -223,6 +223,10 @@
 #define IDC_NEW_PASSWD_LABEL            1224
 #define IDC_CONFIRM_PASSWD_LABEL        1225
 #define IDC_PASSWD_CHANGEREQ_MSG        1226
+#define IDC_SSHFWDLOCALDYNAMIC          1227
+#define IDC_SSHDYNFROMPORT              1228
+#define IDC_SSHFWDLOCALDYNAMIC_LISTEN   1229
+#define IDC_SSHDYNLISTENADDR            1230
 
 // Next default values for new objects
 // 
@@ -230,7 +234,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        114
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1227
+#define _APS_NEXT_CONTROL_VALUE         1231
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: trunk/ttssh2/ttxssh/ttxssh.rc
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.rc	2017-07-05 08:52:29 UTC (rev 6848)
+++ trunk/ttssh2/ttxssh/ttxssh.rc	2017-07-06 21:53:55 UTC (rev 6849)
@@ -260,33 +260,38 @@
     GROUPBOX        "X Forwarding",IDC_XFORWARD,6,130,296,27
 END
 
-IDD_SSHFWDEDIT DIALOGEX 0, 0, 309, 143
+IDD_SSHFWDEDIT DIALOGEX 0, 0, 309, 175
 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
 CAPTION "SSH Port Forwarding"
 FONT 8, "Tahoma", 0, 0, 0x0
 BEGIN
     LTEXT           "Select direction for forwarded port:",IDD_SSHFWDBANNER,6,8,176,11,NOT WS_GROUP
-    COMBOBOX        IDC_SSHLTRFROMPORT,122,31,56,126,CBS_DROPDOWN | WS_VSCROLL | WS_GROUP | WS_TABSTOP
-    RTEXT           "l&isten",IDC_SSHFWDLOCALTOREMOTE_LISTEN,184,32,32,11,NOT WS_GROUP
-    EDITTEXT        IDC_SSHLTRLISTENADDR,219,31,75,13,ES_AUTOHSCROLL
-    LTEXT           "to remote &machine",IDC_SSHFWDLOCALTOREMOTE_HOST,23,48,73,15,NOT WS_GROUP
+    COMBOBOX        IDC_SSHLTRFROMPORT,122,30,56,126,CBS_DROPDOWN | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+    RTEXT           "l&isten",IDC_SSHFWDLOCALTOREMOTE_LISTEN,184,32,36,11,NOT WS_GROUP
+    EDITTEXT        IDC_SSHLTRLISTENADDR,222,30,75,13,ES_AUTOHSCROLL
+    LTEXT           "to remote &machine",IDC_SSHFWDLOCALTOREMOTE_HOST,23,48,73,11,NOT WS_GROUP
     EDITTEXT        IDC_SSHLTRTOHOST,98,48,80,13,ES_AUTOHSCROLL
-    RTEXT           "&port",IDC_SSHFWDLOCALTOREMOTE_PORT,184,50,32,11,NOT WS_GROUP
-    COMBOBOX        IDC_SSHLTRTOPORT,219,48,56,136,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_SSHRTLFROMPORT,122,78,56,135,CBS_DROPDOWN | WS_VSCROLL | WS_GROUP | WS_TABSTOP
-    RTEXT           "li&sten",IDC_SSHFWDREMOTETOLOCAL_LISTEN,184,82,32,11,NOT WS_GROUP
-    EDITTEXT        IDC_SSHRTLLISTENADDR,219,79,75,13,ES_AUTOHSCROLL
-    LTEXT           "to local m&achine",IDC_SSHFWDREMOTETOLOCAL_HOST,23,97,73,15,NOT WS_GROUP
-    EDITTEXT        IDC_SSHRTLTOHOST,98,97,80,13,ES_AUTOHSCROLL
-    RTEXT           "p&ort",IDC_SSHFWDREMOTETOLOCAL_PORT,184,98,32,11,NOT WS_GROUP
-    COMBOBOX        IDC_SSHRTLTOPORT,219,97,56,124,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
-    DEFPUSHBUTTON   "OK",IDOK,96,122,50,14,WS_GROUP
-    PUSHBUTTON      "Cancel",IDCANCEL,162,122,50,14
-    GROUPBOX        "",IDC_STATIC,6,21,296,47
-    GROUPBOX        "",IDC_STATIC,6,70,296,46
-    CONTROL         "Forward &local port",IDC_SSHFWDLOCALTOREMOTE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,32,108,10
+    RTEXT           "&port",IDC_SSHFWDLOCALTOREMOTE_PORT,184,50,34,11,NOT WS_GROUP
+    COMBOBOX        IDC_SSHLTRTOPORT,222,48,56,126,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SSHRTLFROMPORT,122,80,56,126,CBS_DROPDOWN | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+    RTEXT           "li&sten",IDC_SSHFWDREMOTETOLOCAL_LISTEN,184,82,36,11,NOT WS_GROUP
+    EDITTEXT        IDC_SSHRTLLISTENADDR,222,80,75,13,ES_AUTOHSCROLL
+    LTEXT           "to local m&achine",IDC_SSHFWDREMOTETOLOCAL_HOST,23,98,73,11,NOT WS_GROUP
+    EDITTEXT        IDC_SSHRTLTOHOST,98,98,80,13,ES_AUTOHSCROLL
+    RTEXT           "p&ort",IDC_SSHFWDREMOTETOLOCAL_PORT,184,100,34,11,NOT WS_GROUP
+    COMBOBOX        IDC_SSHRTLTOPORT,222,98,56,126,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SSHDYNFROMPORT,122,130,56,126,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "lis&ten",IDC_SSHFWDLOCALDYNAMIC_LISTEN,184,132,36,11
+    EDITTEXT        IDC_SSHDYNLISTENADDR,222,130,75,13,ES_AUTOHSCROLL
+    DEFPUSHBUTTON   "OK",IDOK,96,154,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,162,154,50,14
+    GROUPBOX        "",IDC_STATIC,6,20,296,47
+    GROUPBOX        "",IDC_STATIC,6,70,296,47
+    GROUPBOX        "",IDC_STATIC,6,120,296,29
+    CONTROL         "Forward &local port",IDC_SSHFWDLOCALTOREMOTE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,30,102,10
     CONTROL         "Forward &remote server port",IDC_SSHFWDREMOTETOLOCAL,
-                    "Button",BS_AUTORADIOBUTTON,13,80,108,10
+                    "Button",BS_AUTORADIOBUTTON,13,80,102,10
+    CONTROL         "Forward &dynamic port",IDC_SSHFWDLOCALDYNAMIC,"Button",BS_AUTORADIOBUTTON,13,130,102,10
 END
 
 IDD_SSHTISAUTH DIALOGEX 0, 0, 216, 109
@@ -510,7 +515,7 @@
         LEFTMARGIN, 6
         RIGHTMARGIN, 302
         TOPMARGIN, 7
-        BOTTOMMARGIN, 136
+        BOTTOMMARGIN, 168
     END
 
     IDD_SSHTISAUTH, DIALOG



Ttssh2-commit メーリングリストの案内
Back to archive index