index.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  5. <meta http-equiv="Content-Language" content="utf-8" />
  6. <title>页面</title>
  7. <meta content="all" name="robots" />
  8. <meta name="description" content="" />
  9. <meta name="keywords" content="" />
  10. <meta name="filetype" content="1" />
  11. <meta name="publishedtype" content="1" />
  12. <meta name="pagetype" content="2" />
  13. <meta name="catalogs" content="" />
  14. <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
  15. <!--优先使用 IE 最新版本和 Chrome-->
  16. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  17. <!--360 使用Google Chrome Frame-->
  18. <meta name="renderer" content="webkit">
  19. <link charset="utf-8" rel="stylesheet" href="https://cunchu.site/work/login/standard.css">
  20. <style>
  21. </style>
  22. </head>
  23. <body>
  24. <div class="box owo">
  25. <h4>网址</h4>
  26. <input type="text" id="wangzhan" value="https://www.ip138.com/" stored="">
  27. <h4>代理地址</h4>
  28. <input type="text" id="dldz" value="http://api.tianqiip.com/getip?secret=8nieqg3rpcg2ml08&num=1&type=txt&port=1&time=3&mr=1&sign=73a2f344b40ba112a9625e589751c19a" stored="">
  29. <h4>停留时间(秒)</h4>
  30. <input type="number" id="tljg" value="10" stored="">
  31. <h4>循环间隔(秒)</h4>
  32. <input type="number" id="xhjg" value="30" stored="">
  33. <h4>浏览器身份</h4>
  34. <textarea id="ua">Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1</textarea>
  35. <div class="owo button" onclick="window.running=true;start()">启动</div>
  36. <div class="owo button" onclick="window.running=false;">停止</div>
  37. <div id="xsxx"></div>
  38. </div>
  39. <script>
  40. function start() {
  41. // 获取代理
  42. const requestOptions = {
  43. method: "GET",
  44. redirect: "follow"
  45. };
  46. fetch(window.dldz.value, requestOptions)
  47. .then((response) => response.text())
  48. .then((dldz) => {
  49. console.log(dldz)
  50. dldz = '1.94.181.181:8855'
  51. window.xsxx.innerText = `获取到代理:${dldz}`
  52. window.dldzSet = dldz
  53. window.dldzSet = window.dldzSet.replaceAll('\r', '').replaceAll('\n', '')
  54. window.electronAPI.openWindow({
  55. "width": 350,
  56. "height": 700,
  57. "url": window.wangzhan.value,
  58. "proxy": `http=${dldz};https=${dldz}`,
  59. "userAgent": window.ua.value,
  60. "noCache": true
  61. })
  62. setTimeout(() => {
  63. window.electronAPI.closeAllWindow()
  64. }, parseInt(window.tljg.value) * 1000);
  65. setTimeout(() => {
  66. if (window.running) {
  67. start()
  68. }
  69. }, (parseInt(window.xhjg.value) + parseInt(window.tljg.value)) * 1000);
  70. })
  71. .catch((error) => console.error(error));
  72. }
  73. </script>
  74. <script src="https://cunchu.site/work/login/standard.js"></script>
  75. </body>
  76. </html>