| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using molilian.core;
- using dodohold.core;
- using Microsoft.AspNetCore.Mvc;
- using Org.BouncyCastle.Ocsp;
- using System.Text.Json;
- using System.Runtime.InteropServices;
- using TencentCloud.Scf.V20180416.Models;
- using Quartz.Impl.AdoJobStore.Common;
- using TencentCloud.Gaap.V20180529.Models;
- using System.Net;
- using TencentCloud.Ie.V20200304.Models;
- using TencentCloud.Soe.V20180724.Models;
- namespace molilian.api.Controllers
- {
- [ApiController]
- [MyAuthorize("admin")]
- [Route("api/[controller]/[action]")]
- public class ProxyController : ControllerBase
- {
- readonly IAuthorizationProvider provider = new AdminProvider();
- protected IHttpContextAccessor _accessor;
- public ProxyController(IHttpContextAccessor accessor)
- {
- _accessor = accessor;
- }
- [HttpGet]
- public ActionResult get()
- {
- var list = new DBContext.Table("proxy_nodes")
- .Where("status=@status", new { status = 1 })
- .Select<ProxyNodesDTO>();
- // 参考数据
- //61 1 6 品阅245 品阅辅助网卡 bj http http://172.21.127.245:33128 molilian Bhquvmkn8zLO36lGjuqk 2024-04-09 14:25:53 2024-04-09 14:25:56
- //59 1 6 品阅243 品阅辅助网卡 bj http http://172.21.127.243:33128 molilian Bhquvmkn8zLO36lGjuqk 2024-04-09 14:25:53 2024-04-09 14:25:56
- foreach (var proxy in list)
- {
- //通过 curl myip.ipip.net检测proxy可访问行
- }
- var tasks = new List<Task<int>>
- {
- Task.Run(()=>{ })
- };
- // 等待所有任务完成
- Task.WhenAll(tasks).Wait();
- return new APIResult(new { list });
- }
- }
- }
|