Tema GL tunel mod


SUBMITTED BY: Buganet

DATE: Aug. 1, 2022, 9:15 p.m.

UPDATED: May 27, 2024, 11:20 a.m.

FORMAT: Text only

SIZE: 52.6 kB

HITS: 2405

  1. <html lang="en" style="
  2. "><head>
  3. <meta charset="UTF-8">
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>GUARDIAN</title>
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA==" crossorigin="anonymous" referrerpolicy="no-referrer">
  10. <script src="https://cdn.tailwindcss.com"></script>
  11. <style>
  12. @import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Outfit:wght@100;200;300;400;500;600;700&display=swap');
  13. :root {
  14. /*Editar o modal*/
  15. --btn-modal: #0000003f;
  16. --btn-border: 1px solid #4071FF;
  17. --btn-modal-border: 50px;
  18. --modal-shadow: #ffffff;
  19. --modal-bg: #171e2e;
  20. --modal-icon: #fff;
  21. --config-color: #0000003f;
  22. --category-color: #0000003f;
  23. --text-color: #ffffff;
  24. /*Editar Layout*/
  25. --fundo: #ffffff;
  26. --topo: #F7F7FC;
  27. --icon: #4071FF;
  28. --icon-bg: #E5EAFC;
  29. --config: #F7F7FC;
  30. --box-border: 1px solid #C0C6DE;
  31. --box-bg: transparent;
  32. --box-icon: black;
  33. --info1: #C0C6DE;
  34. --info2: #4071FF;
  35. }
  36. body {
  37. font-family: 'Be Vietnam Pro', sans-serif;
  38. background: var(--fundo);
  39. height: 100vh;
  40. width: 100vw;
  41. justify-content: center;
  42. align-items: center;
  43. }
  44. .container {
  45. display: flex;
  46. flex-direction: row;
  47. justify-content: space-between;
  48. background: var(--topo);
  49. width: 100vw;
  50. padding: 0 auto;
  51. }
  52. button.power-icon {
  53. font-size: 2.5em;
  54. box-shadow: 0 20px 25px 0px #4071ff54, 0 2px 0px 0px #4071ff10;
  55. }
  56. .app-bg-gray-1 {
  57. background: var(--config);
  58. }
  59. .app-bg-gray-2 {
  60. background: var(--icon-bg);
  61. }
  62. .app-bg-gray-3 {
  63. background: #fff;
  64. }
  65. .app-bg-4 {
  66. background: linear-gradient(-45deg, #13cf8e, #13cf8e, #0098ff, #5995fd);
  67. background-size: 400% 400%;
  68. animation: gradient 5s ease infinite;
  69. }
  70. @keyframes gradient {
  71. 0% {
  72. background-position: 0% 50%;
  73. }
  74. 50% {
  75. background-position: 100% 50%;
  76. }
  77. 100% {
  78. background-position: 0% 50%;
  79. }
  80. }
  81. .app-bg-blue {
  82. background: #4071FF;
  83. }
  84. .app-color-blue {
  85. color: #4071FF;
  86. }
  87. .app-color-gray-1 {
  88. color: #C0C6DE;
  89. }
  90. .app-rounded {
  91. border-bottom-left-radius: 50px;
  92. border-bottom-right-radius: 50px;
  93. }
  94. .status {
  95. font-size: 1em;
  96. }
  97. .put {
  98. border-radius: 60px;
  99. }
  100. .icon {
  101. font-size: 0.8em;
  102. color: var(--box-icon);
  103. }
  104. input {
  105. width: 100%;
  106. background: transparent;
  107. border: none;
  108. outline: none;
  109. color: var(--box-typing);
  110. line-height: 1;
  111. font-weight: 600;
  112. font-size: 1.1rem;
  113. }
  114. .box {
  115. border: var(--box-border);
  116. background: var(--box-bg);
  117. }
  118. .tool {
  119. align-items: center;
  120. justify-content: center;
  121. text-align: center;
  122. }
  123. .tool-bt {
  124. background: var(--btn-modal);
  125. height: 50px;
  126. width: 150px;
  127. border: var(--btn-border);
  128. }
  129. .info {
  130. color: var(--info2);
  131. }
  132. .info1 {
  133. color: var(--info1);
  134. }
  135. .info2 {
  136. color: var(--modal-icon);
  137. }
  138. .info3 {
  139. font-size: 1.2em;
  140. color: var(--icon);
  141. }
  142. .modal {
  143. backdrop-filter: blur(5px);
  144. -webkit-backdrop-filter: blur(5px);
  145. }
  146. .modal-content {
  147. border: none;
  148. background: var(--modal-bg);
  149. box-shadow: 0 5px 10px var(--modal-shadow);
  150. color: var(--text-color);
  151. }
  152. .modal-dialog {
  153. padding: 0 0.5rem;
  154. }
  155. .bg-category {
  156. background: var(--category-color);
  157. }
  158. .bg-config {
  159. background: var(--config-color);
  160. }
  161. .btn{
  162. width: 150px;
  163. background-color: #171e2e;
  164. outline: none;
  165. height: 49px;
  166. border-radius: var(--btn-modal-border);
  167. text-transform: uppercase;
  168. font-weight: 600;
  169. margin: 10px 0;
  170. cursor: pointer;
  171. transition: 0.5s;
  172. border: var(--btn-border);
  173. }
  174. </style>
  175. <style>/* ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}::after,::before{--tw-content:''}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*, ::before, ::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.-top-36{top:-9rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mb-0{margin-bottom:0px}.mb-1{margin-bottom:0.25rem}.mb-2{margin-bottom:0.5rem}.mr-2{margin-right:0.5rem}.ms-2{margin-inline-start:0.5rem}.mt-1{margin-top:0.25rem}.mt-2{margin-top:0.5rem}.mt-4{margin-top:1rem}.flex{display:flex}.h-screen{height:100vh}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:0.5rem}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:1rem}.rounded-xl{border-radius:0.75rem}.border-0{border-width:0px}.border-2{border-width:2px}.bg-transparent{background-color:transparent}.p-0{padding:0px}.p-1{padding:0.25rem}.p-5{padding:1.25rem}.px-1{padding-left:0.25rem;padding-right:0.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.py-2\.5{padding-top:0.625rem;padding-bottom:0.625rem}.py-3{padding-top:0.75rem;padding-bottom:0.75rem}.pb-0{padding-bottom:0px}.text-center{text-align:center}.text-start{text-align:start}.text-end{text-align:end}.font-semibold{font-weight:600}.text-white{--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}</style></head>
  176. <body style="font-size: 16px; background: rgb(14, 15, 19); font-family: sans-serif; height: 95%;" class="h-screen">
  177. <div class="icon-container" style="
  178. font-size: 33px;
  179. background: none;
  180. color: #ccc;
  181. margin-top: 27px;
  182. "><!-- Button to open the popup -->
  183. <!-- Popup -->
  184. <div id="loginPopup" style="display: none; position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.87); justify-content: center; align-items: center; z-index: 9999;">
  185. <div style="top: 0;background-color: #151515;padding: 20px;max-width: 300px;margin: 0 auto;border-radius: 18px;box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);">
  186. <div style="
  187. text-align: center;
  188. "><i class="bi bi-box-arrow-in-right" style="
  189. font-size: 67px;
  190. "></i></div><h2 style="
  191. text-align: center;
  192. font-size: 24px;
  193. ">Login</h2><p style="
  194. font-size: 15px;
  195. text-align: center;
  196. margin-bottom: 26px;
  197. ">Digite seu login e senha abaixo, certifique-se de não digitar errado.</p>
  198. <form id="loginForm" style="display: flex !important; flex-direction: column;">
  199. <label for="username" style="margin-bottom: 5px;font-size: 23px;">Login:</label>
  200. <input type="text" id="username" name="username" required="" style="margin-bottom: 10px;padding: 1px;background: #2a2a2a;font-size: 14px;color: #fff;padding: 15px 21px;border-radius: 29px;">
  201. <label for="password" style="margin-bottom: 5px;font-size: 23px;">Senha:</label>
  202. <input type="password" id="password" name="password" required="" style="color: #fff;border-radius: 29px;margin-bottom: 10px;padding: 1px;background: #2a2a2a;font-size: 14px;color: #fff;padding: 15px 21px;border-radius: 29px;">
  203. <button id="closePopupBtn" style="padding: 5px;cursor: pointer;border-radius: 20px;background: #1d1d1d;">Fechar</button>
  204. </form>
  205. </div>
  206. </div>
  207. <div onclick="ToolsModal.show()" style="display: flex;align-items: center;justify-content: center;background-color: #343434;border-radius: 12px;width: 56px;height: 50px;order: 2;color: #fff;font-size: 14px;font-weight: bold;">
  208. <i class="bi bi-list icon-left" style="color: #fff;font-size: 33px;padding: 5px 5px;"></i>
  209. </div><div onclick="DtStartAppUpdate.execute()" style="display: flex;align-items: center;justify-content: center;background-color: #343434;border-radius: 12px;width: 150px;height: 50px;order: 2;color: #fff;font-size: 14px;font-weight: bold;">
  210. <p style="margin: 0;margin-right: 5px;font-size: 14px;">Atualizar</p>
  211. <i class="bi bi-arrow-down-circle-fill" style="color: #fff;font-size: 30px;padding: 5px 5px;"></i>
  212. </div>
  213. </div><div style="display: flex;align-items: center;justify-content: center;background-color: none;border-radius: 68px;width: 90%;margin: 0 auto;padding: 10px;">
  214. <img src="https://i.ibb.co/C6qcHWx/5acdbddd-9b69-479b-bd78-a0e68dbebb04.png" style="
  215. width: 57px;
  216. height: auto;
  217. margin-bottom: -9px;
  218. ">
  219. <div>
  220. <p id="user-name" style="color: #ffb100;margin: 5px 0;font-size: 18px;font-family: sans-serif;font-weight: 600;">Bem Vindo(a)</p>
  221. <p id="dias-rest" style="color: #20ff00;margin: 5px 0;margin-top: -8px;font-weight: 300;font-size: 13px;font-style: initial;">conecte-se primeiro</p>
  222. </div>
  223. <button id="btnrenovar" onclick="DtStartWebViewActivity.execute('https://www.seulink.net/')" style="margin-left: auto;background-color: #18b446;color: #fff;font-size: 16px;border: none;border-radius: 30px;padding: 7px 13px;box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;display: none;align-items: center;border-top-left-radius: 30px;border-bottom-left-radius: 30px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;height: 38px;">
  224. <i class="bi bi-cash" style="font-size: 20px; margin-right: 5px;"></i>
  225. Renovar
  226. </button>
  227. <button id="openPopupBtn" style="margin-left: auto;background-color: #ec0031;color: #fff;font-size: 16px;border: none;border-radius: 30px;padding: 7px 13px;box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;display: flex;align-items: center;height: 38px;border-top-left-radius: 30px;border-bottom-left-radius: 30px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;">
  228. <i class="bi bi-door-open" style="font-size: 20px; margin-right: 5px;"></i>
  229. Login
  230. </button>
  231. <div style="display: flex;align-items: center;justify-content: center;background-color: #343434;border-radius: 12px;width: 45px;height: 38px;border-bottom-left-radius: 0px;border-top-left-radius: 0px;color: #fff;justify-content: center;font-weight: bold;border-top-right-radius: 30px;border-bottom-right-radius: 30px;">
  232. <i onclick="loggerModal.show()" class="bi bi-file-earmark-text" style="color: #fff;font-size: 21px;padding: 5px 5px;padding: 9px 12px;"></i>
  233. </div>
  234. </div>
  235. <div onclick="startStopVpn()" style="display: flex;justify-content: center;align-items: center;height: auto;margin-top: 6px;background-color: transparent;margin-bottom: 33px;">
  236. <div class="btn-conectar" style="
  237. border: 10px solid #00000017;
  238. background-color: #ec0031;
  239. ">
  240. <i class="bi bi-lightning" style="font-size: 57px;text-shadow: 1px 1px #0000002b;color: #fff!important;"></i>
  241. <div class="pulse"></div>
  242. </div>
  243. </div>
  244. <div class="flex flex-row items-center justify-center mt-4" style="
  245. letter-spacing: 0px;
  246. margin-bottom: 0;
  247. font-weight: 400!important;
  248. ">
  249. <span class="status app-color-blue font-semibold" id="state" style="color: red;margin-bottom: 0px;font-weight: 400;">LBL_STATE_DISCONNECTED</span>
  250. </div>
  251. <div class="flex flex-row items-center justify-center mt-4" style="letter-spacing: 0px;font-weight: 400!important;color: #ccc;Z-INDEX: 1;">
  252. <span class="download" style="display: flex;flex-direction: column;align-items: center;background: #000000;width: 100px;border-radius: 13px;padding: 10px 0px;box-shadow: rgb(0 0 0 / 5%) 0px 3px 8px;">
  253. <i class="bi bi-cloud-download" style="font-size: 24px;color: #fff;margin-bottom: 4px;"></i>
  254. <span style="margin: 0;" id="networkDownload">0 B</span>
  255. <p style="margin: 0;font-weight: 600;">Download</p>
  256. </span>
  257. <span class="upload" style="
  258. display: flex;
  259. flex-direction: column;
  260. align-items: center;
  261. background: #000000;
  262. width: 100px;
  263. border-radius: 13px;
  264. padding: 10px 0px;
  265. JUSTIFY-CONTENT: space-between;
  266. margin-left: 15px;
  267. Z-INDEX: 1;
  268. box-shadow: rgb(0 0 0 / 5%) 0px 3px 8px;
  269. ">
  270. <i class="bi bi-cloud-upload" style="font-size: 24px;color: #fff;margin-bottom: 4px;"></i>
  271. <span style="margin: 0;" id="networkUpload">0 B</span>
  272. <p style="margin: 0;font-weight: 600;">Upload</p>
  273. </span>
  274. </div>
  275. <div style="
  276. top: 0;
  277. background: #ccc;
  278. border-radius: 10px;
  279. margin-bottom: 0px!important;
  280. background: transparent;
  281. border-radius: 27px;
  282. width: 100%;
  283. justify-content: center;
  284. text-align: center;
  285. margin-left: auto;
  286. margin-right: auto;
  287. " class="flex flex-col -top-36 relative">
  288. <div class="d-flex gap-2 justify-content-center mb-2 mt-1 flex flex-row items-center px-6 py-2 mx-6 rounded-xl border-slate-150 border-2" style="display: none !important;">
  289. <i class="icon fa fa-lock"></i>
  290. <input type="text" placeholder="V2ray UUID" id="uuid">
  291. <i class="icon fa fa-eye" onclick="uuid.type==`text`?uuid.type = `password`:uuid.type = `text`"></i>
  292. </div>
  293. <div class="flex flex-row items-center justify-center mt-2" style="
  294. margin-top: 0;
  295. margin-top: -1px;
  296. width: 100%;
  297. ">
  298. <div id="btnHotSpot" style="display: flex;align-items: center;MARGIN-RIGHT: 0;justify-content: center;background-color: #000000;border-radius: 12px;width: auto;height: 45px;color: #fff;padding: 18px 51PX;width: auto;margin-bottom: 18px;font-size: 14px;">
  299. <i class="bi bi-wifi" style="color: #fff;font-size: 21PX;padding: 5px 5px;"></i> Hotspot <i id="togglehot" class="bi bi-toggle-off" style="
  300. margin-left: 14px;
  301. font-size: 21px;
  302. "></i>
  303. </div>
  304. </div>
  305. <div style="
  306. display: block;
  307. justify-content: center;
  308. "><div class="box d-flex gap-2 justify-content-center mb-1 mt-1 flex flex-row items-center px-6 py-2.5 mx-6 rounded-xl app-bg-gray-1 border-2" style="
  309. color: #fff;
  310. margin-bottom: 35px;
  311. border-radius: 57px;
  312. font-size: 18px;
  313. width: auto;
  314. display: list-item;
  315. width: auto;
  316. margin-top: 8px!important;
  317. BACKGROUND: #ec0031;
  318. margin-top: 13px!important;
  319. box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
  320. border: 1px solid #0f0f0f;
  321. bottom: 60px;
  322. justify-content: center!important;
  323. ">
  324. <i class="icon fa fa-cogs" style="
  325. color: #ccc;
  326. "></i>
  327. <input type="text" placeholder="Escolha um servidor" disabled="" id="config" style="
  328. text-align: center;
  329. color: #fff;
  330. ">
  331. <i class="icon fa fa-angle-double-down" style="
  332. color: #ccc;
  333. "></i>
  334. </div>
  335. </div>
  336. <div style="justify-content: center;display: flex;"><img src="https://i.ibb.co/W3SXVj3/31bfdf0b-41b3-49bb-8bdb-ce30c7289567.png" style="
  337. width: 328px;
  338. margin-top: 8px;
  339. "></div>
  340. </div>
  341. <div class="modal fade" id="configModal" style="display: none;" aria-hidden="true">
  342. <div class="modal-dialog modal-dialog-centered" role="document">
  343. <div class="modal-content rounded-3 shadow" style="
  344. background: #2f2f2f;
  345. ">
  346. <div class="modal-header border-bottom-0 pb-0">
  347. <h1 class="modal-title fs-5" style="color: var(--text-color);font-weight: 600;">CONFIGURAÇÕES</h1>
  348. <button class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
  349. </div>
  350. <div class="modal-body p-1 text-center">
  351. <ul class="list-group bg-transparent overflow-y-auto config-body" style="max-height: 600px;"><li class="list-group-item bg-transparent border-0 mb-1 rounded-1 px-1" style="color: var(--text-color);"><span class="fw-bold w-100 d-block p-1 rounded-1 mb-1 bg-category">CONFIG 2</span><ul class="list-group overflow-y-auto"><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  352. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  353. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  354. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG 01</span>
  355. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  356. </div>
  357. <div class="d-flex flex-column ms-2">
  358. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">SSH_PROXY</span>
  359. </div>
  360. </li></ul></li><li class="list-group-item bg-transparent border-0 mb-1 rounded-1 px-1" style="color: var(--text-color);"><span class="fw-bold w-100 d-block p-1 rounded-1 mb-1 bg-category">CONFIG 3</span><ul class="list-group overflow-y-auto"><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  361. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  362. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  363. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG. TEST</span>
  364. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  365. </div>
  366. <div class="d-flex flex-column ms-2">
  367. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">SSH_PROXY</span>
  368. </div>
  369. </li><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  370. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  371. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  372. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG. TEST 2</span>
  373. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  374. </div>
  375. <div class="d-flex flex-column ms-2">
  376. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">OVPN_PROXY</span>
  377. </div>
  378. </li></ul></li><li class="list-group-item bg-transparent border-0 mb-1 rounded-1 px-1" style="color: var(--text-color);"><span class="fw-bold w-100 d-block p-1 rounded-1 mb-1 bg-category">CONFIG</span><ul class="list-group overflow-y-auto"><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  379. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  380. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  381. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG 02</span>
  382. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  383. </div>
  384. <div class="d-flex flex-column ms-2">
  385. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">SSH_DIRECT</span>
  386. </div>
  387. </li><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  388. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  389. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  390. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG 01</span>
  391. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  392. </div>
  393. <div class="d-flex flex-column ms-2">
  394. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">V2RAY - VLESS</span>
  395. </div>
  396. </li><li class="list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1" style="color: var(--text-color);">
  397. <img src="https://cdn-icons-png.flaticon.com/512/8187/8187143.png" width="40" height="40">
  398. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  399. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">CONFIG 03</span>
  400. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;"></span>
  401. </div>
  402. <div class="d-flex flex-column ms-2">
  403. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">OVPN_PROXY</span>
  404. </div>
  405. </li></ul></li></ul>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. <div class="modal fade" id="loggerModal" style="display: none;" aria-hidden="true">
  411. <div class="modal-dialog modal-dialog-centered" role="document" style="
  412. BORDER-RADIUS: 11PX;
  413. ">
  414. <div class="modal-content rounded-3 shadow" style="
  415. BACKGROUND: #1f1f1f;
  416. ">
  417. <div class="modal-body p-1 text-center">
  418. <ul class="list-group bg-transparent overflow-y-auto logger-content" style="max-height: 600px;"><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 0</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 1</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 2</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 3</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 4</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 5</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 6</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 7</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 8</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 9</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 10</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 11</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 12</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 13</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 14</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 15</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 16</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 17</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 18</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 19</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 20</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 21</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 22</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 23</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 24</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 25</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 26</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 27</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 28</li><li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">TIME MESSAGE 29</li></ul>
  419. </div>
  420. <div class="modal-footer flex-nowrap p-0">
  421. <button class="btn btn-primary w-100 clear-logger" style="background-color:var(--btn-modal);BORDER: 1PX SOLID #CCC;BORDER-RADIUS: 23PX!IMPORTANT;">LIMPAR</button>
  422. <button type="button" class="btn btn-primary w-100" data-bs-dismiss="modal" style="background-color: var(--btn-modal);BORDER: 1PX SOLID #CCC;">FECHAR</button>
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. <div class="tool webm modal fade" index="-1" id="ToolsModal" style="display: none;" aria-hidden="true">
  428. <div class="modal-dialog modal-dialog-centered" role="document">
  429. <div class="modal-content" style="
  430. background: #1f1f1f;
  431. box-shadow: none;
  432. ">
  433. <div class="tool modal-header" style="
  434. border: none;
  435. font-size: 24px;
  436. ">
  437. <h5 class="modal-title" style="color:#ffffff;">FERRAMENTAS</h5>
  438. </div>
  439. <div class="modal-body" style="
  440. border: none;
  441. ">
  442. <button class="tool-bt rounded-2xl text-white" onclick="DtStartCheckUser.execute()" style="
  443. border: none;
  444. display: none;
  445. "><i class="info2 bi bi-calendar-check mr-2"></i>VALIDADE</button>
  446. </div>
  447. <div class="modal-body">
  448. <button class="tool-bt rounded-2xl text-white" data-bs-target="#speedTestModal" data-bs-toggle="modal" style="
  449. border: none;
  450. "><i class="info2 bi bi-speedometer mr-2"></i>SPEEDTEST</button>
  451. <button class="tool-bt rounded-2xl text-white" onclick="DtStartWebViewActivity.execute('https://t.me/DTunnelGroup')" style="
  452. border: none;
  453. "><i class="info2 bi bi-globe mr-2"></i>WEBVIEW</button>
  454. </div>
  455. <div class="modal-body">
  456. <button class="tool-bt rounded-2xl text-white" onclick="DtStartApnActivity.execute()" style="
  457. border: none;
  458. "><i class="info2 bi bi-wifi mr-2"></i>APN</button>
  459. <button class="tool-bt rounded-2xl text-white" onclick="DtIgnoreBatteryOptimizations.execute()" style="
  460. border: none;
  461. "><i class="info2 bi bi-battery-full mr-2"></i>BATERIA</button>
  462. </div>
  463. <div class="modal-body">
  464. <button class="tool-bt rounded-2xl text-white" onclick="DtCleanApp.execute()" style="
  465. border: none;
  466. "><i class="info2 bi bi-trash3 mr-2"></i>LIMPAR</button>
  467. </div>
  468. <div class="tool modal-footer" style="
  469. border-top: 1px solid #323131;
  470. ">
  471. <button type="button" class="btn btn-primary" data-bs-dismiss="modal" style="background-color: var(--btn-modal);border: none;">FECHAR</button>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. <div class="modal fade" id="checkUserModal" index="1">
  477. <div class="modal-dialog modal-dialog-centered" role="document">
  478. <div class="modal-content rounded-3 shadow">
  479. <div class="modal-header border-bottom-0 pb-0">
  480. <h1 class="modal-title fs-5 chk-title text-light"></h1>
  481. <button class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
  482. </div>
  483. <div class="modal-body text-center">
  484. <p class="fs-5 mb-0 chk-message text-light"></p>
  485. </div>
  486. </div>
  487. </div>
  488. </div>
  489. <div class="md modal fade" id="speedTestModal">
  490. <div class="md modal-dialog modal-dialog-centered" role="document">
  491. <div class="md modal-content rounded-3 shadow">
  492. <div class="md modal-header border-bottom-0 py-3">
  493. <button class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
  494. </div>
  495. <div class="modal-body ratio rounded-bottom-3" style="height: 600px;">
  496. <div class="spinner d-flex w-100 h-100 align-items-center justify-content-center">
  497. <div class="spinner-border text-light p-5" role="status">
  498. <span class="visually-hidden">Loading...</span>
  499. </div>
  500. </div>
  501. <iframe class="rounded-bottom-3" id="speedFrame"></iframe>
  502. </div>
  503. </div>
  504. </div>
  505. </div>
  506. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.min.js"></script>
  507. <script>
  508. Object.defineProperty(String.prototype, 't', {
  509. value: function t() {
  510. return window?.DtTranslateText?.execute('' + this) ?? '' + this
  511. },
  512. writable: true,
  513. configurable: true,
  514. })
  515. const config = document.querySelector('#config')
  516. config.parentElement.onclick = () => showConfigsModal();
  517. const username = document.querySelector('#username')
  518. username.oninput = e => DtUsername.set(e.target.value)
  519. const password = document.querySelector('#password')
  520. password.oninput = e => DtPassword.set(e.target.value)
  521. const uuid = document.querySelector('#uuid')
  522. uuid.oninput = e => DtUuid.set(e.target.value)
  523. const clearLogger = document.querySelector('.clear-logger')
  524. const checkUserModal = new bootstrap.Modal(document.querySelector('#checkUserModal'))
  525. const configModal = new bootstrap.Modal(document.querySelector('#configModal'))
  526. const loggerModal = new bootstrap.Modal(document.querySelector('#loggerModal'))
  527. const ToolsModal = new bootstrap.Modal(document.querySelector('#ToolsModal'))
  528. const speedTestModal = new bootstrap.Modal(document.querySelector('#speedTestModal'))
  529. const dtConfigClickListener = () => {
  530. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{ "auth": {"username": ""} }`)
  531. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  532. config.placeholder = data.name ?? 'Escolha um servidor';
  533. username.parentElement.style.setProperty('display', !data?.auth?.username && !isV2ray ? 'flex' : 'none', 'important')
  534. password.parentElement.style.setProperty('display', !data?.auth?.password && !isV2ray ? 'flex' : 'none', 'important')
  535. uuid.parentElement.style.setProperty('display', !data?.auth?.v2ray_uuid && isV2ray ? 'flex' : 'none', 'important')
  536. }
  537. const startStopVpn = e => {
  538. if (DtGetVpnState.execute() != 'DISCONNECTED') {
  539. DtExecuteVpnStop.execute()
  540. } else {
  541. DtExecuteVpnStart.execute()
  542. }
  543. }
  544. clearLogger.addEventListener('click', () => DtClearLogs.execute())
  545. speedTestModal._element.addEventListener('shown.bs.modal', () => {
  546. const iframe = document.querySelector('#speedFrame');
  547. if (!iframe.src) {
  548. iframe.src = 'http://speedtest.sercomtel.com.br/'
  549. iframe.addEventListener('load', () => {
  550. mp3Modal._element.querySelector('.spinner').classList.add('d-none')
  551. })
  552. }
  553. })
  554. speedTestModal._element.addEventListener('hide.bs.modal', () => {
  555. const iframe = document.querySelector('#speedFrame');
  556. iframe.src = '';
  557. })
  558. const dtVpnStateListener = state => {
  559. const isConectado= state === 'CONNECTED';
  560. const isDesconectado= state === 'DISCONNECTED';
  561. const isRunning = state != 'DISCONNECTED';
  562. const status = document.querySelector('#state')
  563. status.innerHTML = ('LBL_STATE_' + state).t()
  564. if (isRunning) {
  565. username.setAttribute('readonly', 'true')
  566. password.setAttribute('readonly', 'true')
  567. status.style.color = '#00ff15'
  568. } else {
  569. username.removeAttribute('readonly')
  570. password.removeAttribute('readonly')
  571. status.style.color = 'RED'
  572. }
  573. if (isDesconectado) {
  574. document.getElementById("dias-rest").innerHTML = "conecte-se primeiro"
  575. document.getElementById("user-name").innerHTML = "Bem Vindo(a)"
  576. document.getElementById("openPopupBtn").style.display = "flex";
  577. document.getElementById("btnrenovar").style.display = "none";
  578. }
  579. if (isConectado) {
  580. document.getElementById("user-name").innerHTML = username.value
  581. document.getElementById("openPopupBtn").style.display = "none";
  582. document.getElementById("btnrenovar").style.display = "flex";
  583. }
  584. }
  585. const dtCheckUserStartedListener = () => {
  586. const data = JSON.parse(window?.DtGetDefaultConfig?.execute() || `{}`)
  587. const isV2ray = data?.mode?.toLowerCase()?.startsWith('v2ray');
  588. if (isV2ray || !data.urlCheckUser) return;
  589. const html = `
  590. <div class="d-flex justify-content-center">
  591. <div class="spinner-border p-4" role="status">
  592. <span class="visually-hidden">Loading...</span>
  593. </div>
  594. </div>
  595. `
  596. checkUserModal._element.querySelector('.chk-title').textContent = 'CHECK USER'
  597. checkUserModal._element.querySelector('.chk-message').innerHTML = html;
  598. checkUserModal.show()
  599. }
  600. const dtCheckUserModelListener = model => {
  601. const data = JSON.parse(model ?? `{"username": "test"}`)
  602. const html = `${data.expiration_days} dias restantes`
  603. document.getElementById("dias-rest").innerHTML = html
  604. }
  605. const showConfigsModal = () => {
  606. const mock = '[{"sorter":6,"color":"#6D08041C","name":"CONFIG","id":1393,"items":[{"mode":"V2RAY - VLESS","sorter":4,"tlsVersion":"TLSv1.2","name":"CONFIG 01","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":11803,"status":"ACTIVE"},{"mode":"SSH_DIRECT","sorter":2,"tlsVersion":"TLSv1.2","name":"CONFIG 02","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":28627,"status":"ACTIVE"},{"mode":"OVPN_PROXY","sorter":23,"tlsVersion":"TLSv1.2","name":"CONFIG 03","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":30001,"status":"ACTIVE"}]},{"sorter":2,"color":"#6D08041C","name":"CONFIG 2","id":1846,"items":[{"mode":"SSH_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG 01","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":26295,"status":"ACTIVE"}]},{"sorter":4,"color":"#80000000","name":"CONFIG 3","id":3310,"items":[{"mode":"SSH_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG. TEST","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":29997,"status":"ACTIVE"},{"mode":"OVPN_PROXY","sorter":1,"tlsVersion":"TLSv1.2","name":"CONFIG. TEST 2","icon":"https://cdn-icons-png.flaticon.com/512/8187/8187143.png","id":29998,"status":"ACTIVE"}]}]'
  607. const data = JSON.parse(window?.DtGetConfigs?.execute() || mock)
  608. data.sort((a, b) => a.sorter - b.sorter)
  609. data.forEach(item => item.items.sort((a, b) => a.sorter - b.sorter))
  610. const body = configModal._element.querySelector('.config-body')
  611. body.innerHTML = ''
  612. data.forEach(category => {
  613. const categoryElement = document.createElement('li')
  614. categoryElement.className = 'list-group-item bg-transparent border-0 mb-1 rounded-1 px-1'
  615. categoryElement.style.color = 'var(--text-color)'
  616. categoryElement.innerHTML = `<span class="fw-bold w-100 d-block p-1 rounded-1 mb-1 bg-category">${category.name}</span>`
  617. const configUlElement = document.createElement('ul')
  618. configUlElement.className = 'list-group overflow-y-auto'
  619. category.items.forEach(item => {
  620. const configElement = document.createElement('li')
  621. configElement.className = 'list-group-item d-flex border-0 bg-config rounded-2 px-1 py-2 mb-1'
  622. configElement.style.color = 'var(--text-color)'
  623. configElement.innerHTML = `
  624. <img src="${item.icon}" width="40" height="40">
  625. <div class="text-start d-flex flex-column ms-2 w-100 text-truncate">
  626. <span class="fw-bold text-uppercase" style="font-size: 0.8rem;">${item.name}</span>
  627. <span class="fst-italic fw-bold text-uppercase" style="font-size: 0.7rem;">${item.description || ''}</span>
  628. </div>
  629. <div class="d-flex flex-column ms-2">
  630. <span class="fst-italic fw-bold text-end text-uppercase text-nowrap" style="font-size: 0.8rem;">${item.mode}</span>
  631. </div>
  632. </li>
  633. `
  634. configElement.addEventListener('click', e => {
  635. window?.DtSetConfig?.execute(item.id)
  636. configModal.hide()
  637. })
  638. configUlElement.appendChild(configElement)
  639. })
  640. categoryElement.appendChild(configUlElement)
  641. body.appendChild(categoryElement)
  642. })
  643. configModal.show()
  644. }
  645. const dtOnNewLogListener = () => {
  646. const mock = [];
  647. for (let i = 0; i < 30; i++) {
  648. mock.push({ 'TIME': 'MESSAGE ' + i })
  649. }
  650. const log = window?.DtGetLogs?.execute() || JSON.stringify(mock)
  651. const data = JSON.parse(log)
  652. let content = '';
  653. data.forEach(item => {
  654. content += '<li class="list-group-item bg-transparent p-0 border-0 text-start ms-2 text-wrap" style="font-size: 12px; color: var(--text-color);">';
  655. content += Object.keys(item)[0] + " " + item[Object.keys(item)]
  656. content += '</li>';
  657. })
  658. loggerModal._element.querySelector('.logger-content').innerHTML = content;
  659. const listGroup = loggerModal._element.querySelector('.list-group')
  660. listGroup.scrollTo(0, listGroup.scrollHeight)
  661. }
  662. username.value = window?.DtUsername?.get() ?? ''
  663. password.value = window?.DtPassword?.get() ?? ''
  664. uuid.value = window?.DtUuid?.get() ?? ''
  665. dtOnNewLogListener()
  666. dtConfigClickListener()
  667. dtVpnStateListener(window?.DtGetVpnState?.execute() ?? 'DISCONNECTED')
  668. </script>
  669. <script>
  670. class AndroidMock {
  671. static getLocalIP() {
  672. return '192.168.0.1';
  673. }
  674. static getConfig() {
  675. return JSON.stringify({
  676. urlCheckUser: 'URLAQUI'
  677. });
  678. }
  679. static getNetworkName() {
  680. return 'REDE';
  681. }
  682. static openRadioInfo() {
  683. console.log('openRadioInfo');
  684. }
  685. }
  686. </script>
  687. <script>
  688. function showLocalIP(android) {
  689. console.log(android.getNetworkName());
  690. document.getElementById('name').innerHTML = ' ' + android.getNetworkName() + ':';
  691. document.getElementById('ip').innerHTML = android.getLocalIP();
  692. setInterval(() => {
  693. document.getElementById('name').innerHTML =
  694. ' ' + android.getNetworkName() + ':';
  695. document.getElementById('ip').innerHTML = android.getLocalIP();
  696. }, 2000)
  697. }
  698. window.onload = function () {
  699. const android = window.Android || AndroidMock;
  700. showLocalIP(android);
  701. showCheckUser(android);
  702. }
  703. </script>
  704. <script>
  705. const openPopupBtn = document.getElementById("openPopupBtn");
  706. const closePopupBtn = document.getElementById("closePopupBtn");
  707. const loginPopup = document.getElementById("loginPopup");
  708. openPopupBtn.addEventListener("click", () => {
  709. loginPopup.style.display = "flex";
  710. });
  711. closePopupBtn.addEventListener("click", () => {
  712. loginPopup.style.display = "none";
  713. });
  714. // Close the popup if the user clicks outside of it
  715. window.addEventListener("click", (event) => {
  716. if (event.target === loginPopup) {
  717. loginPopup.style.display = "none";
  718. }
  719. });
  720. // Prevent the default form submission behavior and add your login logic here
  721. const loginForm = document.getElementById("loginForm");
  722. loginForm.addEventListener("submit", (event) => {
  723. event.preventDefault();
  724. // Add your login logic here
  725. });
  726. </script><style> .icon-container {
  727. display: flex;
  728. justify-content: space-between;
  729. align-items: center;
  730. background-color: #ccc;
  731. border-radius: 68px;
  732. width: 90%;
  733. margin: 0 auto;
  734. padding: 10px;
  735. }
  736. .bi {
  737. font-size: 40px;
  738. color: #fff;
  739. }
  740. .icon-left {
  741. order: 1; /* Posiciona o ícone à esquerda */
  742. }
  743. .icon-right {
  744. order: 2; /* Posiciona o ícone à direita */
  745. }
  746. @keyframes pulseAnimation {
  747. 0% {
  748. transform: scale(1);
  749. opacity: 0.7;
  750. }
  751. 100% {
  752. transform: scale(2);
  753. opacity: 0;
  754. }
  755. }
  756. .btn-conectar {
  757. position: relative;
  758. display: flex;
  759. align-items: center;
  760. justify-content: center;
  761. background-color: #007bff;
  762. border-radius: 50%;
  763. width: 160px;
  764. height: 160px;
  765. cursor: pointer;
  766. box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  767. }
  768. .pulse {
  769. position: absolute;
  770. width: 100%;
  771. height: 100%;
  772. background-color: #0061ca5c;
  773. border-radius: 50%;
  774. animation: pulseAnimation 2s infinite;
  775. pointer-events: none;
  776. }.bi {
  777. font-size: 17px;
  778. color: #fff;
  779. }
  780. </style>
  781. <script>
  782. const startHotSpot = () => {
  783. DtStartHotSpotService.execute();
  784. document.getElementById("togglehot").className = "bi bi-toggle-on";
  785. }
  786. const stopHotSpot = () => {
  787. DtStopHotSpotService.execute();
  788. document.getElementById("togglehot").className = "bi bi-toggle-off";
  789. }
  790. const toggleHotSpot = () => {
  791. const hotSpotStatus = window?.DtGetStatusHotSpotService?.execute() ?? 'STOPPED';
  792. hotSpotStatus == 'RUNNING' ? stopHotSpot() : startHotSpot();
  793. }
  794. const btnHotSpot = document.querySelector("#btnHotSpot");
  795. btnHotSpot.addEventListener('click', toggleHotSpot);
  796. const formatBytes = bytes => {
  797. const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
  798. if (bytes === 0) return '0 B';
  799. const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
  800. return (bytes / Math.pow(1024, i)).toPrecision(3) + ' ' + sizes[i];
  801. }
  802. const currentNetworkDownload = window?.DtGetNetworkDownloadBytes?.execute() ?? 0
  803. const currentNetworkUpload = window?.DtGetNetworkUploadBytes?.execute() ?? 0
  804. setInterval(() => {
  805. const networkDownload = document.querySelector('#networkDownload');
  806. const networkUpload = document.querySelector('#networkUpload');
  807. const newNetworkDownload = window?.DtGetNetworkDownloadBytes?.execute() ?? 0;
  808. const newNetworkUpload = window?.DtGetNetworkUploadBytes?.execute() ?? 0;
  809. networkDownload.innerHTML = formatBytes(newNetworkDownload - currentNetworkDownload);
  810. networkUpload.innerHTML = formatBytes(newNetworkUpload - currentNetworkUpload);
  811. }, 1000)
  812. const setVpnState = state => {
  813. if (state == 'CONNECTED') startSocket();
  814. }
  815. startSocket();
  816. </script>
  817. </body></html>

comments powered by Disqus