Node.js interface to UFW forked to allow execution of your Node process as non-root user.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
854 B

declare const nodeUfw: {
name: string;
version: string;
disable: () => Promise<Boolean>;
enable: () => Promise<Boolean>;
reset: () => Promise<Boolean>;
reload: () => Promise<Boolean>;
status: (raw?: boolean) => Promise<string | Array<ParsedStatus>>;
logging: (type: LoggingType) => Promise<Boolean>;
allow: {
port: (port: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
address: (address: string, port?: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
};
deny: {
port: (port: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
address: (address: string, port?: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
};
};
type LoggingType = 'off' | 'on' | 'low' | 'medium' | 'high' | 'full';
interface ParsedStatus {
to: string;
action: string;
from: string;
}
export = nodeUfw;