Skip to content

Commit

Permalink
1.bugfix:Appid generated incorrect. 2.winform UI enhancement.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoonlight committed Sep 22, 2019
1 parent af9680f commit f862593
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 94 deletions.
13 changes: 7 additions & 6 deletions src/NSmartProxy.ClientRouter/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,21 @@ public async Task Start(bool AlwaysReconnect = false)
{
int counter = 0;

//2.分配配置:appid为0时说明没有分配appid,所以需要分配一个
//2.从服务端返回的appid上分配客户端的appid TODO 3 appid逻辑需要重新梳理
foreach (var app in appIdIpPortConfig)
{
if (app.AppId == 0)
{
app.AppId = clientModel.AppList[counter].AppId;
counter++;
}
//if (app.AppId == 0)
//{
app.AppId = clientModel.AppList[counter].AppId;
counter++;
//}
}
Logger.Debug("****************port list*************");
List<string> tunnelstrs = new List<string>();
foreach (var ap in clientModel.AppList)
{
var cApp = appIdIpPortConfig.First(obj => obj.AppId == ap.AppId);
//var cApp = appIdIpPortConfig[ap.AppId];
var tunnelStr = ap.AppId + ": " + ClientConfig.ProviderAddress + ":" +
ap.Port + "=>" +
cApp.IP + ":" + cApp.TargetServicePort;
Expand Down
4 changes: 2 additions & 2 deletions src/NSmartProxy.Infrastructure/Shared/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
public sealed class Global
{
public const string NO_TOKEN_STRING = "notoken";
public const string NSmartProxyClientName = "NSmartProxy Client v1.0_Beta";
public const string NSmartProxyServerName = "NSmartProxy Server v1.0_Beta";
public const string NSmartProxyClientName = "NSmartProxy Client v1.0";
public const string NSmartProxyServerName = "NSmartProxy Server v1.0";

public const int ClientReconnectInterval = 3000;//客户端断线重连时间间隔(毫秒)

Expand Down
2 changes: 1 addition & 1 deletion src/NSmartProxy/Extension/HttpServerStaticFiles/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<script src="Chart.min.js"></script>
<!--<script src="dashboard.js"></script>-->
<!--<script src="bootstrap-table-expandable.js"></script>-->
<script src="main.js?v=135"></script>
<script src="main.js?v=145"></script>
<script></script>

</body>
Expand Down
4 changes: 2 additions & 2 deletions src/NSmartProxy/Extension/HttpServerStaticFiles/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//TODO 调试用
//var basepath = "/";//api根地址,这里需要和配置文件一致
var basepath = "http://localhost:12309/";
var basepath = "/";//api根地址,这里需要和配置文件一致
//var basepath = "http://localhost:12309/";

//hashchange事件,路由是如此实现的
(function () {
Expand Down
99 changes: 58 additions & 41 deletions src/NSmartProxyWinform/ClientMngr.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f862593

Please sign in to comment.