From 409e8d915f9240d48b88f899ebdf592c7e0fdea1 Mon Sep 17 00:00:00 2001 From: dosgo Date: Mon, 2 May 2016 10:36:32 +0800 Subject: [PATCH] =?UTF-8?q?1.32=E4=BF=AE=E5=A4=8Dtcp=E6=98=A0=E5=B0=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 2 +- ngrok.cpp | 2 +- sendmsg.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index e6697de8..65fc8fa7 100644 --- a/main.cpp +++ b/main.cpp @@ -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; diff --git a/ngrok.cpp b/ngrok.cpp index b2f8e728..98f372f4 100644 --- a/ngrok.cpp +++ b/ngrok.cpp @@ -79,7 +79,7 @@ int SetLocalAddrInfo(char *url,char *ReqId,int regstate,list*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++) diff --git a/sendmsg.cpp b/sendmsg.cpp index 1b50ecea..0832a6f5 100644 --- a/sendmsg.cpp +++ b/sendmsg.cpp @@ -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); }