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 = () => { this.socket.onopen = () => {
chrome.runtime.sendMessage({action: ActionType.STATUS, connected: true, port: port}); chrome.runtime.sendMessage({action: ActionType.STATUS, connected: true, port: port});
this.startHeartbeat(); // this.startHeartbeat();
}; };
this.socket.onmessage = (event) => { this.socket.onmessage = (event) => {
@@ -42,6 +42,7 @@ export class WebSocketManager {
sendMessage(message) { sendMessage(message) {
if (this.isConnected()) { if (this.isConnected()) {
try { try {
console.log("发射", message)
this.socket.send(JSON.stringify(message)); this.socket.send(JSON.stringify(message));
} catch (e) { } catch (e) {
console.error("Error sending message:", e); console.error("Error sending message:", e);
+1 -1
View File
@@ -16,7 +16,7 @@ function App() {
> >
<div className="App"> <div className="App">
<Contro/> <Contro/>
<Proxifier/> {/*<Proxifier/>*/}
<EvalInTab/> <EvalInTab/>
</div> </div>
+1
View File
@@ -68,6 +68,7 @@ export const Proxifier: React.FC<ProxifierProps> = () => {
wsc.updateProxyStatus(); wsc.updateProxyStatus();
wsc.onProxyStatusMessage((msg) => { wsc.onProxyStatusMessage((msg) => {
console.log("msg", msg)
if (msg.proxy === undefined || msg.enable === undefined) { if (msg.proxy === undefined || msg.enable === undefined) {
return; return;
} }