feat(wsc) brute encrypt demo

This commit is contained in:
go0p
2026-08-06 15:11:35 +08:00
committed by go0p
parent c352d629c0
commit 070f89068d
3 changed files with 293 additions and 291 deletions
+2 -1
View File
@@ -22,7 +22,7 @@ export class WebSocketManager {
this.socket.onopen = () => {
chrome.runtime.sendMessage({action: ActionType.STATUS, connected: true, port: port});
this.startHeartbeat();
// this.startHeartbeat();
};
this.socket.onmessage = (event) => {
@@ -42,6 +42,7 @@ export class WebSocketManager {
sendMessage(message) {
if (this.isConnected()) {
try {
console.log("发射", message)
this.socket.send(JSON.stringify(message));
} catch (e) {
console.error("Error sending message:", e);
+1 -1
View File
@@ -16,7 +16,7 @@ function App() {
>
<div className="App">
<Contro/>
<Proxifier/>
{/*<Proxifier/>*/}
<EvalInTab/>
</div>
+10 -9
View File
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import { Space, Select, Input, Switch } from "antd";
import { PlusSmIcon, TrashIcon } from "@assets/icon/icon";
import { wsc } from "@network/chrome";
import React, {useEffect, useState} from "react";
import {Space, Select, Input, Switch} from "antd";
import {PlusSmIcon, TrashIcon} from "@assets/icon/icon";
import {wsc} from "@network/chrome";
import "./Proxifier.css";
type Scheme = "http" | "socks5";
@@ -68,6 +68,7 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
wsc.updateProxyStatus();
wsc.onProxyStatusMessage((msg) => {
console.log("msg", msg)
if (msg.proxy === undefined || msg.enable === undefined) {
return;
}
@@ -206,7 +207,7 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
}}
>
<span className="Prox-add-text"></span>
<PlusSmIcon className="Prox-add-icon" />
<PlusSmIcon className="Prox-add-icon"/>
</div>
</div>
<div className="Prox-list-wrap">
@@ -217,7 +218,7 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
<Space.Compact>
<Select
value={item.scheme}
style={{ width: 88 }}
style={{width: 88}}
disabled={item.open}
onChange={(value, option) => {
const copyProxyList = structuredClone(proxyList);
@@ -235,14 +236,14 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
</Select>
<Input
value={item.host}
style={{ width: 136 }}
style={{width: 136}}
disabled={item.open}
status={item.hostStatus}
onChange={(e) => hostOnchange(e.target.value, item.id)}
/>
<Input
value={item.port}
style={{ width: 64 }}
style={{width: 64}}
disabled={item.open}
status={item.portStatus}
onChange={(e) => portOnchange(e.target.value, item.id)}
@@ -300,7 +301,7 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
]);
}}
>
<PlusSmIcon className="add-list-icon" />
<PlusSmIcon className="add-list-icon"/>
<span className="add-list-text"></span>
</div>
)}