Skip to content

Commit

Permalink
1.32修复tcp映射bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dosgo committed May 2, 2016
1 parent 34ab876 commit 409e8d9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#include "nonblocking.h"

using namespace std;
string VER = "1.31-(2016/5/2)";
string VER = "1.32-(2016/5/2)";

char s_name[255]="ngrokd.ngrok.com";
int s_port= 443;
Expand Down
2 changes: 1 addition & 1 deletion ngrok.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int SetLocalAddrInfo(char *url,char *ReqId,int regstate,list<TunnelInfo*>*tunnel
char host[128] = { 0 };
char portstr[8]={0};
int port =0;
sscanf(url,"%[^:]://%[^:]:%[1-9]",protocol,host,portstr);
sscanf(url,"%[^:]://%[^:]:%[0-9]",protocol,host,portstr);
port=atoi(portstr);
//进行迭代遍历
for(iter = (*tunnellist).begin(); iter !=(*tunnellist).end(); iter++)
Expand Down
1 change: 0 additions & 1 deletion sendmsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ int SendReqTunnel(int sock,ssl_context *ssl,char *ReqId,const char *protocol,con
memset(str,0,1024);
memcpy(ReqId,guid,strlen(guid));//copy
sprintf(str,"{\"Type\":\"ReqTunnel\",\"Payload\":{\"Protocol\":\"%s\",\"ReqId\":\"%s\",\"Hostname\": \"%s\",\"Subdomain\":\"%s\",\"HttpAuth\":\"\",\"RemotePort\":%d,\"authtoken\":\"%s\"}}",protocol,guid,HostName,Subdomain,RemotePort,authtoken);
printf("SendReqTunnel:%s\r\n",str);
return sendpack(sock,ssl,str,1);
}

Expand Down

0 comments on commit 409e8d9

Please sign in to comment.