Moduled Firegex, Merging pt2 (to finish and test)

This commit is contained in:
DomySh
2022-07-21 21:17:06 +02:00
parent 63ba0e94e7
commit 1399d0e22d
23 changed files with 177 additions and 391 deletions

View File

@@ -31,3 +31,23 @@ export type IpInterface = {
name:string,
addr:string
}
export type RegexFilter = {
id:number,
service_id:string,
regex:string
is_blacklist:boolean,
is_case_sensitive:boolean,
mode:string //C S B => C->S S->C BOTH
n_packets:number,
active:boolean
}
export type RegexAddForm = {
service_id:string,
regex:string,
is_case_sensitive:boolean,
is_blacklist:boolean,
mode:string, // C->S S->C BOTH,
active: boolean
}

View File

@@ -2,6 +2,7 @@ import { showNotification } from "@mantine/notifications";
import { ImCross } from "react-icons/im";
import { TiTick } from "react-icons/ti"
import { nfregex } from "../components/NFRegex/utils";
import { regexproxy } from "../components/RegexProxy/utils";
import { ChangePassword, IpInterface, LoginResponse, PasswordSend, ServerResponse, ServerResponseToken, ServerStatusResponse } from "./models";
var Buffer = require('buffer').Buffer
@@ -57,6 +58,16 @@ export function gatmainpath(){
return ""
}
export function getapiobject(){
switch(gatmainpath()){
case "nfregex":
return nfregex
case "regexproxy":
return regexproxy
}
throw 'No api for this tool!';
}
export function fireUpdateRequest(){
window.dispatchEvent(new Event(eventUpdateName))
}