Darknet traffic detection system, a cyber-crime activity detection system that detects the use of Tor and VPNs, is one way to reduce the occurrence of darknet cyber-crimes. Current existing detection tools such as machine learning models have shown its capability in detecting darknet network traffics. However, it still faces some limitations in its performance due to suboptimal hyperparameters. One of the existing classification models used for darknet traffic detection, such as Random Forest demonstrated great performance in detecting darknet activities. This research utilizes the Firefly Algorithm (FA), a prominent swarm intelligence method, to fine-tune hyperparameters and enhance the detection capabilities of the Random Forest (RF) model. The proposed RF-FA (Random Forest – Firefly Algorithm) approach is evaluated against the standard Random Forest model. Tests performed on the CIC-Darknet2020 dataset reveal that the Firefly Algorithm improves the RF model's performance in all key metrics. The optimized RF-FA model attains an accuracy, precision, recall, and F1-score of 98.73%, surpassing the baseline RF model, which achieves 98.62% in accuracy, precision, and recall, along with an F1-score of 98.61%.
Copyrights © 2026