프로젝트

일반

사용자정보

개정판 e19522be

IDe19522bee832d1dc0287335570e8cac729268ee6
상위 f80bd9c5
하위 ed3ff4a1

김동진이(가) 5년 이상 전에 추가함

issue #1152: S&I 대비 내/외부 포트포워딩 정보 ini 추가

Change-Id: I289fa63f91bea6feb6a70bdf68c1c2a3fee9e678

차이점 보기:

CommonLib/Common.cs
75 75
                stringBuilder = new StringBuilder();
76 76
                GetPrivateProfileString("Internal", "IP", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini"));
77 77
                string internal_ip = stringBuilder.ToString();
78
                result = result.Replace(internal_ip, external_ip);
78

  
79
                //internalport:externalport
80
                stringBuilder = new StringBuilder();
81
                GetPrivateProfileString("PortForwarding", "HUB", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini"));
82
                string[] forwarding_hub = stringBuilder.ToString().Split(':');
83
                stringBuilder = new StringBuilder();
84
                GetPrivateProfileString("PortForwarding", "RESOURCE", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini"));
85
                string[] forwarding_resource = stringBuilder.ToString().Split(':');
86
                stringBuilder = new StringBuilder();
87
                GetPrivateProfileString("PortForwarding", "BASE", "", stringBuilder, 512, Path.Combine(AppDataFolder, "MARKUS.ini"));
88
                string[] forwarding_base = stringBuilder.ToString().Split(':');
89

  
90
                if(result.Contains(internal_ip))
91
                    result = result.Replace(internal_ip, external_ip);
92
                if(result.Contains(":" + forwarding_hub[0]))
93
                    result = result.Replace(":" + forwarding_hub[0], ":" + forwarding_hub[1]);
94
                if (result.Contains(":" + forwarding_resource[0]))
95
                    result = result.Replace(":" + forwarding_resource[0], ":" + forwarding_resource[1]);
96
                if (result.Contains(":" + forwarding_base[0]))
97
                    result = result.Replace(":" + forwarding_base[0], ":" + forwarding_base[1]);
79 98
            }
80 99
            return result;
81 100
        }
KCOM/MARKUS.ini
33 33
[SetThumbnail]
34 34
WIDTH=100
35 35
[Site]
36
NAME=DAELIM
36
NAME=DAELIM
37
[PortForwarding]
38
HUB=5100:5100
39
RESOURCE=5977:5977
40
BASE=5979:5979
Site/Daelim/ini/MARKUS.ini
33 33
[SetThumbnail]
34 34
WIDTH=100
35 35
[Site]
36
NAME=DAELIM
36
NAME=DAELIM
37
[PortForwarding]
38
HUB=5100:5100
39
RESOURCE=5977:5977
40
BASE=5978:5978
Site/Daelim/ini/Test/MARKUS.ini
1 1
[Internal]
2 2
IP=172.20.101.119
3 3
[External]
4
IP=203.226.6.165
4
IP=172.20.101.119
5 5
[BaseClientAddress]
6 6
URL=http://172.20.101.119:5978
7 7
[HubAddress]
......
33 33
[SetThumbnail]
34 34
WIDTH=100
35 35
[Site]
36
NAME=DAELIM
36
NAME=DAELIM
37
[PortForwarding]
38
HUB=5100:5100
39
RESOURCE=5977:5977
40
BASE=5978:5978

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)