xianfeng
This commit is contained in:
@@ -12,6 +12,8 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
namespace Hncore.Pass.Vpn.Service
|
||||
{
|
||||
public class AgentClient1Service:AgentClientBaseService
|
||||
@@ -537,16 +539,26 @@ namespace Hncore.Pass.Vpn.Service
|
||||
/// <returns></returns>
|
||||
public override async Task<bool> Exist(string account)
|
||||
{
|
||||
// var client = CreateHttpClient();
|
||||
// var title = GetOpTitle("Exist", account);
|
||||
// LogHelper.Info(title, account);
|
||||
// var testRet = await this.NewAccount("free", account, "1234", 1, 0);
|
||||
// if (testRet.Code == ResultCode.C_SUCCESS)
|
||||
// {
|
||||
// await DeleteAccount(account);
|
||||
// return false;
|
||||
// }
|
||||
return false;
|
||||
|
||||
|
||||
var secretId = "626B6170693231";
|
||||
var secretKey = "6b3fdfc206841f44c6609bf19c182a6a";
|
||||
|
||||
var url = "http://bkapi.pptp.biz/userapi3/?secretId="+secretId+"&secretKey="+secretKey+"&type=getuserlenNum&user="+account;
|
||||
|
||||
var client = CreateHttpClient();
|
||||
|
||||
var resp = await client.GetAsync(url);
|
||||
var content = await resp.Content.ReadAsStringAsync();
|
||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||
var status = jo["code"].ToString();
|
||||
|
||||
|
||||
if (status =="1")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user