chore: remove unused files and code
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Delete obsolete RPM maintainer scripts (postinst, prerm, postrm) Scripts are now embedded in ja4sentinel.spec - Delete unused RPM test script (test-rpm.sh) Referenced non-existent el7 builds, not integrated in CI - Remove unused constants and functions from api/types.go: - DefaultInterface, DefaultPort, DefaultBPFFilter - DefaultFlowTimeout, DefaultPacketBuffer - LogLevelDebug, LogLevelInfo, LogLevelWarn, LogLevelError - DefaultConfig() function - Update Makefile with RPM_DIR variable for consistency Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
34
api/types.go
34
api/types.go
@ -232,37 +232,3 @@ func NewLogRecord(ch TLSClientHello, fp *Fingerprints) LogRecord {
|
||||
|
||||
return rec
|
||||
}
|
||||
|
||||
// Default values and constants
|
||||
|
||||
const (
|
||||
DefaultInterface = "eth0"
|
||||
DefaultPort = 443
|
||||
DefaultBPFFilter = ""
|
||||
DefaultFlowTimeout = 30 // seconds
|
||||
DefaultPacketBuffer = 1000 // packet channel buffer size
|
||||
|
||||
// Logging levels
|
||||
LogLevelDebug = "DEBUG"
|
||||
LogLevelInfo = "INFO"
|
||||
LogLevelWarn = "WARN"
|
||||
LogLevelError = "ERROR"
|
||||
)
|
||||
|
||||
// DefaultConfig returns an AppConfig with sensible default values.
|
||||
// Uses eth0 as the default interface, port 443 for monitoring,
|
||||
// no BPF filter, a 30-second flow timeout, and a 1000-packet
|
||||
// channel buffer. Returns an empty outputs slice (caller must
|
||||
// configure outputs explicitly).
|
||||
func DefaultConfig() AppConfig {
|
||||
return AppConfig{
|
||||
Core: Config{
|
||||
Interface: DefaultInterface,
|
||||
ListenPorts: []uint16{DefaultPort},
|
||||
BPFFilter: DefaultBPFFilter,
|
||||
FlowTimeoutSec: DefaultFlowTimeout,
|
||||
PacketBufferSize: DefaultPacketBuffer,
|
||||
},
|
||||
Outputs: []OutputConfig{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user