mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-22 03:10:43 +08:00
feat(wsc) brute encrypt demo
This commit is contained in:
+2
-1
@@ -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
@@ -16,7 +16,7 @@ function App() {
|
|||||||
>
|
>
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<Contro/>
|
<Contro/>
|
||||||
<Proxifier/>
|
{/*<Proxifier/>*/}
|
||||||
|
|
||||||
<EvalInTab/>
|
<EvalInTab/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user