├── .idea ├── .gitignore ├── 1DCNN.iml ├── inspectionProfiles │ └── profiles_settings.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── 1d_cnn ├── __pycache__ │ ├── data.cpython-36.pyc │ ├── data.cpython-37.pyc │ ├── model.cpython-36.pyc │ └── model.cpython-37.pyc ├── cnn_1d_tensorflow.py ├── cnn_1d_torch.py ├── data.py ├── model.py └── test_data.py ├── README.md └── data ├── 12class ├── FlowAllLayers │ ├── MNIST │ │ ├── processed │ │ │ ├── test.pt │ │ │ └── training.pt │ │ └── raw │ │ │ ├── t10k-images-idx3-ubyte │ │ │ ├── t10k-images-idx3-ubyte.gz │ │ │ ├── t10k-labels-idx1-ubyte │ │ │ ├── t10k-labels-idx1-ubyte.gz │ │ │ ├── train-images-idx3-ubyte │ │ │ ├── train-images-idx3-ubyte.gz │ │ │ ├── train-labels-idx1-ubyte │ │ │ └── train-labels-idx1-ubyte.gz │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── test-images-idx3-ubyte │ ├── test-labels-idx1-ubyte │ ├── train-images-idx3-ubyte │ ├── train-images-idx3-ubyte.gz │ ├── train-labels-idx1-ubyte │ └── train-labels-idx1-ubyte.gz ├── FlowL7 │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz ├── SessionAllLayers │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz ├── SessionL7 │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz └── convert.py ├── 2class ├── FlowAllLayers │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz ├── FlowL7 │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz ├── SessionAllLayers │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz └── SessionL7 │ ├── t10k-images-idx3-ubyte.gz │ ├── t10k-labels-idx1-ubyte.gz │ ├── train-images-idx3-ubyte.gz │ └── train-labels-idx1-ubyte.gz └── 6class ├── NovpnFlowAllLayers ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── NovpnFlowL7 ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── NovpnSessionAllLayers ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── NovpnSessionL7 ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── VpnFlowAllLayers ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── VpnFlowL7 ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz ├── VpnSessionAllLayers ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz └── VpnSessionL7 ├── t10k-images-idx3-ubyte.gz ├── t10k-labels-idx1-ubyte.gz ├── train-images-idx3-ubyte.gz └── train-labels-idx1-ubyte.gz /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/1DCNN.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /1d_cnn/__pycache__/data.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/1d_cnn/__pycache__/data.cpython-36.pyc -------------------------------------------------------------------------------- /1d_cnn/__pycache__/data.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/1d_cnn/__pycache__/data.cpython-37.pyc -------------------------------------------------------------------------------- /1d_cnn/__pycache__/model.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/1d_cnn/__pycache__/model.cpython-36.pyc -------------------------------------------------------------------------------- /1d_cnn/__pycache__/model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/1d_cnn/__pycache__/model.cpython-37.pyc -------------------------------------------------------------------------------- /1d_cnn/cnn_1d_tensorflow.py: -------------------------------------------------------------------------------- 1 | # Wei Wang (ww8137@mail.ustc.edu.cn) 2 | # 3 | # This Source Code Form is subject to the terms of the Mozilla Public 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this file, You 5 | # can obtain one at http://mozilla.org/MPL/2.0/. 6 | # ============================================================================== 7 | 8 | import time 9 | import sys 10 | import numpy as np 11 | import os 12 | 13 | # load MNIST data 14 | from torchvision import datasets 15 | 16 | # start tensorflow interactiveSession 17 | import tensorflow as tf 18 | import torch 19 | 20 | # Note: if class numer is 2 or 20, please edit the variable named "num_classes" in /usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py" 21 | DATA_DIR = sys.argv[1] 22 | CLASS_NUM = int(sys.argv[2]) 23 | TRAIN_ROUND = int(sys.argv[3]) 24 | #DATA_DIR = '/root/data/withip/10class/BenignFlowAllLayers' 25 | #CLASS_NUM = 10 26 | #TRAIN_ROUND = 40000 27 | 28 | dict_2class = {0:'Novpn',1:'Vpn'} 29 | dict_6class_novpn = {0:'Chat',1:'Email',2:'File',3:'P2p',4:'Streaming',5:'Voip'} 30 | dict_6class_vpn = {0:'Vpn_Chat',1:'Vpn_Email',2:'Vpn_File',3:'Vpn_P2p',4:'Vpn_Streaming',5:'Vpn_Voip'} 31 | dict_12class = {0:'Chat',1:'Email',2:'File',3:'P2p',4:'Streaming',5:'Voip',6:'Vpn_Chat',7:'Vpn_Email',8:'Vpn_File',9:'Vpn_P2p',10:'Vpn_Streaming',11:'Vpn_Voip'} 32 | dict = {} 33 | 34 | folder = os.path.split(DATA_DIR)[1] 35 | 36 | sess = tf.InteractiveSession() 37 | 38 | flags = tf.app.flags 39 | FLAGS = flags.FLAGS 40 | flags.DEFINE_string('data_dir', DATA_DIR, 'Directory for storing data') 41 | 42 | mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True) 43 | 44 | # function: find a element in a list 45 | def find_element_in_list(element, list_element): 46 | try: 47 | index_element = list_element.index(element) 48 | return index_element 49 | except ValueError: 50 | return -1 51 | 52 | # weight initialization 53 | def weight_variable(shape): 54 | initial = tf.truncated_normal(shape, stddev=0.1) 55 | return tf.Variable(initial) 56 | 57 | def bias_variable(shape): 58 | initial = tf.constant(0.1, shape = shape) 59 | return tf.Variable(initial) 60 | 61 | # convolution 62 | def conv2d(x, W): 63 | return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME') 64 | # pooling 65 | def max_pool_2x2(x): 66 | return tf.nn.max_pool(x, ksize=[1, 1, 3, 1], strides=[1, 1, 3, 1], padding='SAME') 67 | 68 | # Create the model 69 | # placeholder 70 | x = tf.placeholder("float", [None, 784]) 71 | y_ = tf.placeholder("float", [None, CLASS_NUM]) 72 | 73 | # first convolutinal layer 74 | w_conv1 = weight_variable([1, 25, 1, 32]) 75 | b_conv1 = bias_variable([32]) 76 | 77 | x_image = tf.reshape(x, [-1, 1, 784, 1]) 78 | 79 | h_conv1 = tf.nn.relu(conv2d(x_image, w_conv1) + b_conv1) 80 | h_pool1 = max_pool_2x2(h_conv1) 81 | 82 | # second convolutional layer 83 | w_conv2 = weight_variable([1, 25, 32, 64]) 84 | b_conv2 = bias_variable([64]) 85 | 86 | h_conv2 = tf.nn.relu(conv2d(h_pool1, w_conv2) + b_conv2) 87 | h_pool2 = max_pool_2x2(h_conv2) 88 | 89 | # densely connected layer 90 | w_fc1 = weight_variable([1*88*64, 1024]) 91 | b_fc1 = bias_variable([1024]) 92 | 93 | h_pool2_flat = tf.reshape(h_pool2, [-1, 1*88*64]) 94 | h_fc1 = tf.nn.relu(tf.matmul(h_pool2_flat, w_fc1) + b_fc1) 95 | 96 | # dropout 97 | keep_prob = tf.placeholder("float") 98 | h_fc1_drop = tf.nn.dropout(h_fc1, keep_prob) 99 | 100 | # readout layer 101 | w_fc2 = weight_variable([1024, CLASS_NUM]) 102 | b_fc2 = bias_variable([CLASS_NUM]) 103 | 104 | # From Site1997: This would cause nan or 0 gradient if "tf.matmul(h_fc1_drop, w_fc2) + b_fc2" is all zero or nan, 105 | # so when the training iteration is big enough, all weights could suddenly became 0. 106 | # Use tf.nn.softmax_cross_entropy_with_logits instead. It handles the extreme case safely. 107 | # y_conv = tf.nn.softmax(tf.matmul(h_fc1_drop, w_fc2) + b_fc2) 108 | 109 | tf.nn.softmax_cross_entropy_with_logits(tf.matmul(h_fc1_drop, w_fc2) + b_fc2) 110 | 111 | # define var&op of training&testing 112 | actual_label = tf.argmax(y_, 1) 113 | label,idx,count = tf.unique_with_counts(actual_label) 114 | cross_entropy = -tf.reduce_sum(y_*tf.log(y_conv)) 115 | train_step = tf.train.GradientDescentOptimizer(1e-4).minimize(cross_entropy) 116 | predict_label = tf.argmax(y_conv, 1) 117 | label_p,idx_p,count_p = tf.unique_with_counts(predict_label) 118 | correct_prediction = tf.equal(predict_label, actual_label) 119 | accuracy = tf.reduce_mean(tf.cast(correct_prediction, "float")) 120 | correct_label=tf.boolean_mask(actual_label,correct_prediction) 121 | label_c,idx_c,count_c=tf.unique_with_counts(correct_label) 122 | 123 | # if model exists: restore it 124 | # else: train a new model and save it 125 | saver = tf.train.Saver() 126 | model_name = "model_" + str(CLASS_NUM) + "class_" + folder 127 | model = model_name + '/' + model_name + ".ckpt" 128 | if not os.path.exists(model + ".meta"): 129 | sess.run(tf.global_variables_initializer()) 130 | if not os.path.exists(model_name): 131 | os.makedirs(model_name) 132 | for i in range(TRAIN_ROUND+1): 133 | batch = mnist.train.next_batch(50) 134 | if i%100 == 0: 135 | train_accuracy = accuracy.eval(feed_dict={x:batch[0], y_:batch[1], keep_prob:1.0}) 136 | s = "step %d, train accuracy %g" %(i, train_accuracy) 137 | print(s) 138 | # if i%2000 == 0: 139 | # with open('out.txt','a') as f: 140 | # f.write(s + "\n") 141 | train_step.run(feed_dict={x:batch[0], y_:batch[1], keep_prob:0.5}) 142 | 143 | save_path = saver.save(sess, model) 144 | print("Model saved in file:", save_path) 145 | else: 146 | saver.restore(sess, model) 147 | print("Model restored: " + model) 148 | 149 | # evaluate the model 150 | if CLASS_NUM == 12: 151 | dict = dict_12class 152 | elif CLASS_NUM == 2: 153 | dict = dict_2class 154 | elif CLASS_NUM == 6: 155 | if folder.startswith('Novpn'): 156 | dict = dict_6class_novpn 157 | elif folder.startswith('Vpn'): 158 | dict = dict_6class_vpn 159 | label,count,label_p,count_p,label_c,count_c,acc=sess.run([label,count,label_p,count_p,label_c,count_c,accuracy],{x: mnist.test.images, y_: mnist.test.labels, keep_prob:1.0}) 160 | acc_list = [] 161 | for i in range(CLASS_NUM): 162 | n1 = find_element_in_list(i,label.tolist()) 163 | count_actual = count[n1] 164 | n2 = find_element_in_list(i,label_c.tolist()) 165 | count_correct = count_c[n2] if n2>-1 else 0 166 | n3 = find_element_in_list(i,label_p.tolist()) 167 | count_predict = count_p[n3] if n3>-1 else 0 168 | 169 | recall = float(count_correct)/float(count_actual) 170 | precision = float(count_correct)/float(count_predict) if count_predict>0 else -1 171 | acc_list.append([str(i),dict[i],str(recall),str(precision)]) 172 | with open('out.txt','a') as f: 173 | f.write("\n") 174 | t = time.strftime('%Y-%m-%d %X',time.localtime()) 175 | f.write(t + "\n") 176 | f.write('DATA_DIR: ' + DATA_DIR+ "\n") 177 | for item in acc_list: 178 | f.write(', '.join(item) + "\n") 179 | f.write('Total accuracy: ' + str(acc) + "\n\n") 180 | -------------------------------------------------------------------------------- /1d_cnn/cnn_1d_torch.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | import time 3 | import sys 4 | import torch.nn as nn 5 | import numpy as np 6 | import os 7 | 8 | import torchvision 9 | 10 | from model import OneCNN,CNNImage,OneCNNC 11 | from torchvision import datasets,transforms 12 | import gzip 13 | import torch 14 | from data import DealDataset 15 | 16 | 17 | def main(): 18 | # Device configuration 19 | device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') 20 | 21 | # 设置超参数 22 | batch_size = 50 23 | lr = 1.0e-4 24 | num_epochs = 40 25 | # label_num = 12 26 | label_num=12 27 | 28 | 29 | # 导入数据 30 | folder_path_list=[ 31 | r"data/12class/FlowAllLayerss", 32 | r"data/12class/FlowL7", 33 | r"data/12class/SessionAllLayers", 34 | r"data/12class/SessionL7", 35 | ] 36 | 37 | # task_index 可以取 0,1,2,3 38 | task_index = 0 39 | 40 | folder_path = folder_path_list[task_index] 41 | train_data_path = "train-images-idx3-ubyte.tgz" 42 | train_label_path = "train-labels-idx1-ubyte.tgz" 43 | test_data_path = "t10k-images-idx3-ubyte.tgz" 44 | test_label_path = "t10k-labels-idx1-ubyte.tgz" 45 | 46 | trainDataset = DealDataset(folder_path,train_data_path,train_label_path) 47 | testDataset = DealDataset(folder_path,test_data_path,test_label_path) 48 | 49 | train_loader = torch.utils.data.DataLoader( 50 | dataset=trainDataset, 51 | batch_size=batch_size, 52 | shuffle=True 53 | ) 54 | 55 | test_loader = torch.utils.data.DataLoader( 56 | dataset=testDataset, 57 | batch_size=batch_size, 58 | shuffle=False 59 | ) 60 | 61 | # 定义模型 62 | model = OneCNNC(label_num) 63 | model = model.to(device) 64 | # model = CNNImage() 65 | 66 | # Loss and optimizer 67 | criterion = nn.CrossEntropyLoss() 68 | optimizer = torch.optim.SGD(model.parameters(), lr=lr) 69 | 70 | # Train the model 71 | total_step = len(train_loader) 72 | for epoch in range(num_epochs): 73 | for i, (images, labels) in enumerate(train_loader): 74 | # images=images.reshape(-1,1,28,28) 75 | images = images.to(device) 76 | labels = labels.to(device) 77 | # print(images.shape) 78 | # print(labels.shape) 79 | # Forward pass 80 | outputs = model(images.to(torch.float32)) 81 | loss = criterion(outputs, labels) 82 | 83 | # Backward and optimize 84 | optimizer.zero_grad() 85 | loss.backward() 86 | optimizer.step() 87 | 88 | if (i+1) % 100 == 0: 89 | print ('Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}' 90 | .format(epoch+1, num_epochs, i+1, total_step, loss.item())) 91 | # Test the model 92 | model.eval() 93 | with torch.no_grad(): 94 | correct = 0 95 | total = 0 96 | test_length = len(testDataset) 97 | for images, labels in test_loader: 98 | images = images.to(device) 99 | labels = labels.to(device) 100 | outputs = model(images.to(torch.float32)) 101 | _, predicted = torch.max(outputs.data, 1) 102 | total += labels.size(0) 103 | correct += (predicted == labels).sum().item() 104 | 105 | print('Test Accuracy of the model on the {} test images: {} %'.format(test_length,100 * correct / total)) 106 | 107 | # Save the model checkpoint 108 | torch.save(model.state_dict(), 'model.ckpt') 109 | 110 | if __name__=='__main__': 111 | main() 112 | 113 | -------------------------------------------------------------------------------- /1d_cnn/data.py: -------------------------------------------------------------------------------- 1 | import os 2 | from torch.utils.data import Dataset 3 | import gzip 4 | import numpy as np 5 | class DealDataset(Dataset): 6 | """ 7 | 读取数据、初始化数据 8 | """ 9 | 10 | def __init__(self, folder, data_name, label_name, transform=None): 11 | (train_set, train_labels) = load_data(folder, data_name,label_name) 12 | self.train_set = train_set 13 | self.train_labels = train_labels 14 | self.transform = transform 15 | 16 | def __getitem__(self, index): 17 | img, target = self.train_set[index], int(self.train_labels[index]) 18 | img=img.copy() 19 | # 28*28 -> 764 20 | img=img.reshape(1,1,-1) 21 | # target=target.copy() 22 | if self.transform is not None: 23 | img = self.transform(img) 24 | return img, target 25 | 26 | def __len__(self): 27 | return len(self.train_set) 28 | 29 | 30 | def load_data(data_folder, data_name, label_name): 31 | with gzip.open(os.path.join(data_folder, label_name), 'rb') as lbpath: 32 | y_train = np.frombuffer(lbpath.read(), np.uint8, offset=8) 33 | 34 | with gzip.open(os.path.join(data_folder, data_name), 'rb') as imgpath: 35 | x_train = np.frombuffer( 36 | imgpath.read(), np.uint8, offset=16).reshape(len(y_train), 28, 28) 37 | return (x_train, y_train) 38 | -------------------------------------------------------------------------------- /1d_cnn/model.py: -------------------------------------------------------------------------------- 1 | from re import S 2 | import torch.nn as nn 3 | import torch 4 | import torch.nn.functional as F 5 | class OneCNN(nn.Module): 6 | def __init__(self,label_num): 7 | super(OneCNN,self).__init__() 8 | self.layer_1 = nn.Sequential( 9 | # 输入784*1 10 | nn.Conv2d(1,32,(1,25),1,padding='same'), 11 | nn.ReLU(), 12 | # 输出262*32 13 | nn.MaxPool2d((1, 3), 3, padding=0), 14 | ) 15 | self.layer_2 = nn.Sequential( 16 | # 输入261*32 17 | nn.Conv2d(32,64,(1,25),1,padding='same'), 18 | nn.ReLU(), 19 | # 输入261*64 20 | nn.MaxPool2d((1, 3), 3, padding=0) 21 | ) 22 | self.fc1=nn.Sequential( 23 | # 输入88*64 24 | nn.Flatten(), 25 | nn.Linear(87*64,1024), 26 | nn.Dropout(p=0.5), 27 | nn.Linear(1024,label_num), 28 | nn.Dropout(p=0.3) 29 | ) 30 | def forward(self,x): 31 | # print("x.shape:",x.shape) 32 | x=self.layer_1(x) 33 | # print("x.shape:",x.shape) 34 | x=self.layer_2(x) 35 | # print("x.shape:",x.shape) 36 | x=self.fc1(x) 37 | # print("x.shape:",x.shape) 38 | return x 39 | 40 | 41 | class OneCNNC(nn.Module): 42 | def __init__(self,label_num): 43 | super(OneCNNC,self).__init__() 44 | self.layer_1 = nn.Sequential( 45 | # 输入784*1 46 | nn.Conv2d(1,32,(1,25),1,padding='same'), 47 | nn.ReLU(), 48 | # 输出262*32 49 | nn.MaxPool2d((1, 3), 3, padding=(0,1)), 50 | ) 51 | self.layer_2 = nn.Sequential( 52 | # 输入262*32 53 | nn.Conv2d(32,64,(1,25),1,padding='same'), 54 | nn.ReLU(), 55 | # 输入262*64 56 | nn.MaxPool2d((1, 3), 3, padding=(0,1)) 57 | ) 58 | self.fc1=nn.Sequential( 59 | # 输入88*64 60 | nn.Flatten(), 61 | nn.Linear(88*64,1024), 62 | nn.Dropout(p=0.5), 63 | nn.Linear(1024,label_num), 64 | nn.Dropout(p=0.3) 65 | ) 66 | def forward(self,x): 67 | # print("x.shape:",x.shape) 68 | x=self.layer_1(x) 69 | # print("x.shape:",x.shape) 70 | x=self.layer_2(x) 71 | # print("x.shape:",x.shape) 72 | x=self.fc1(x) 73 | # print("x.shape:",x.shape) 74 | return x 75 | 76 | class CNNImage(nn.Module): 77 | def __init__(self): 78 | super(CNNImage, self).__init__() 79 | self.model = nn.Sequential( 80 | nn.Conv2d(3, 32, 5, 1, 2), 81 | nn.MaxPool2d(2), 82 | nn.Conv2d(32, 32, 5, 1, 2), 83 | nn.MaxPool2d(2), 84 | nn.Conv2d(32, 64, 5, 1, 2), 85 | nn.MaxPool2d(2), 86 | nn.Flatten(), 87 | nn.Linear(64*4*4, 64), 88 | nn.Linear(64, 10) 89 | ) 90 | 91 | def forward(self, x): 92 | x = self.model(x) 93 | return x 94 | 95 | 96 | # x=torch.tensor([[1, 1, 0, 1, 2, 3], 97 | # [1, 1, 4, 5, 6, 7], 98 | # [1, 10, 8, 9, 10, 11]],dtype=torch.float32) 99 | # x=x.reshape(1,3,-1) 100 | 101 | 102 | # out_tensor=F.max_pool2d(x,(3,1),stride=3,padding=0) 103 | 104 | # print(out_tensor) -------------------------------------------------------------------------------- /1d_cnn/test_data.py: -------------------------------------------------------------------------------- 1 | import gzip 2 | 3 | train_data_path = "data/12class/SessionAllLayers/t10k-images-idx3-ubyte.gz" 4 | train_label_path = "data/12class/SessionAllLayers/t10k-labels-idx3-ubyte.gz" 5 | 6 | f = gzip.open(train_data_path,'rb') 7 | 8 | for line in f.readlines(): 9 | s = line.decode() 10 | print(s) 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### 关于分类 2 | - 分类类别:依次是2 6 12 分类问题,类别如下 3 | 4 | ``` 5 | dict_2class = {0:'Novpn',1:'Vpn'} 6 | dict_6class_novpn = {0:'Chat',1:'Email',2:'File',3:'P2p',4:'Streaming',5:'Voip'} 7 | dict_6class_vpn = {0:'Vpn_Chat',1:'Vpn_Email',2:'Vpn_File',3:'Vpn_P2p',4:'Vpn_Streaming',5:'Vpn_Voip'} 8 | dict_12class = {0:'Chat',1:'Email',2:'File',3:'P2p',4:'Streaming',5:'Voip',6:'Vpn_Chat',7:'Vpn_Email',8:'Vpn_File',9:'Vpn_P2p',10:'Vpn_Streaming',11:'Vpn_Voip'} 9 | ``` 10 | ### 关于数据来源 11 | 12 |   这里是直接使用论文作者给出的预处理好的数据,处理工具原始文章的仓库也以及给出 13 | 14 | ### 使用 15 | - 运行`1d_cnn/cnn_1d_torch`进行12分类 16 | - 修改29-36行换数据集 17 | - 修改26行的`label_num`变量与38行更换任务 18 | 19 | > `1d_cnn/cnn_1d_tensorflow`是原文代码,这里并没有调试,供参考 20 | 21 | 原文代码: 22 | [https://github.com/mydre/wang-wei-s-research](https://github.com/mydre/wang-wei-s-research) 23 | 24 | 博客地址: 25 | [烟玉蓝田的博客-加密流量分类torch实践1:1D-CNN模型训练与测试](https://blog.csdn.net/qq_45125356/article/details/126956497?spm=1001.2014.3001.5501) 26 | 27 | -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/processed/test.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/processed/test.pt -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/processed/training.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/processed/training.pt -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/t10k-images-idx3-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/t10k-images-idx3-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/t10k-labels-idx1-ubyte: -------------------------------------------------------------------------------- 1 | '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/train-images-idx3-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/train-images-idx3-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/train-labels-idx1-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/train-labels-idx1-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/MNIST/raw/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/MNIST/raw/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/test-images-idx3-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/test-images-idx3-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/test-labels-idx1-ubyte: -------------------------------------------------------------------------------- 1 | '  2 |       3 |    4 |              5 |       6 |          7 |   8 |   9 |     10 |     11 |    12 |  13 |     14 |           15 |  16 |      17 |   18 |    19 |  20 |  21 |      22 | 23 |    24 |          25 |          26 |   27 |              28 |                 29 |     30 | 31 |   32 |  33 |    34 |              35 |                  36 |    37 |     38 |     39 |          40 |        41 |         42 |             43 |  44 |     45 |  46 |    47 |          48 |                    49 |  50 |      51 |        52 |        53 |   54 |      55 |          56 |               57 |     58 |   59 |    60 |  61 |    62 |   63 |     64 |    65 |  66 |    67 |         68 |       69 |  70 |           71 |    72 | 73 |          74 |     75 |    76 |     77 |  78 |  79 |                 80 |            81 |       82 |  83 |   84 |    85 |       86 |  87 |  88 |    89 |     90 |     91 |  92 |  93 |  94 |            95 |  96 |   97 |     98 |  99 |                   100 |    101 |  102 |        103 |                        104 |  105 |       106 |   107 |        108 |            109 |  110 |                  111 |              112 |       113 |    114 |  115 |       116 |  117 |                    118 |      119 |           120 |     121 |  122 |              123 |  124 |    -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/train-images-idx3-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/train-images-idx3-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/train-labels-idx1-ubyte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/train-labels-idx1-ubyte -------------------------------------------------------------------------------- /data/12class/FlowAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/FlowL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/FlowL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/12class/SessionL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/12class/SessionL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/12class/convert.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import gzip 3 | import numpy as np 4 | import os 5 | 6 | def load_data_gz(data_folder): 7 | files = ['train-labels-idx1-ubyte.gz', 'train-images-idx3-ubyte.gz', 't10k-labels-idx1-ubyte.gz', 8 | 't10k-images-idx3-ubyte.gz'] 9 | 10 | paths = [] 11 | for fname in files: 12 | paths.append(os.path.join(data_folder, fname)) 13 | 14 | # 读取每个文件夹的数据 15 | with gzip.open(paths[0], 'rb') as lbpath: 16 | y_train = np.frombuffer(lbpath.read(), np.uint8, offset=8) 17 | 18 | with gzip.open(paths[1], 'rb') as imgpath: 19 | x_train = np.frombuffer(imgpath.read(), np.uint8, offset=16).reshape(len(y_train), 784) 20 | 21 | with gzip.open(paths[2], 'rb') as lbpath: 22 | y_test = np.frombuffer(lbpath.read(), np.uint8, offset=8) 23 | 24 | with gzip.open(paths[3], 'rb') as imgpath: 25 | x_test = np.frombuffer(imgpath.read(), np.uint8, offset=16).reshape(len(y_test), 784) 26 | 27 | return x_train, y_train, x_test, y_test 28 | 29 | # 调用load_data_gz函数加载数据集 30 | data_folder = r'data/12class/SessionAllLayers' 31 | x_train_gz, y_train_gz, x_test_gz, y_test_gz = load_data_gz(data_folder) 32 | 33 | print('x_train_gz.shape:', x_train_gz.shape) 34 | print('y_train_gz.shape', y_train_gz.shape) 35 | print('x_test_gz.shape:', x_test_gz.shape) 36 | print('y_test_gz.shape:', y_test_gz.shape) 37 | 38 | # 784->28*28 39 | train_image = np.zeros([x_train_gz.shape[0], 28, 28]).astype(np.float32) 40 | 41 | for i in range(x_train_gz.shape[0]): 42 | re = x_train_gz[i, :].reshape(28, 28) 43 | train_image[i, :, :] = re 44 | print('train_image.shape: ', train_image.shape) 45 | 46 | # 选择前n张进行查看 47 | n=20 48 | plt.figure() 49 | for i in range(n): 50 | plt.subplot(5, 4, i+1) 51 | plt.imshow(train_image[i, :, :], 'gray') 52 | plt.axis('off') 53 | plt.show() 54 | 55 | -------------------------------------------------------------------------------- /data/2class/FlowAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/FlowL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/FlowL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/2class/SessionL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/2class/SessionL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnFlowL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnFlowL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/NovpnSessionL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/NovpnSessionL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnFlowL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnFlowL7/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionAllLayers/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionAllLayers/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionAllLayers/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionAllLayers/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionAllLayers/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionAllLayers/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionAllLayers/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionAllLayers/train-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionL7/t10k-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionL7/t10k-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionL7/t10k-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionL7/t10k-labels-idx1-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionL7/train-images-idx3-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionL7/train-images-idx3-ubyte.gz -------------------------------------------------------------------------------- /data/6class/VpnSessionL7/train-labels-idx1-ubyte.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulu-cloud/Pytorch-Encrypted-Traffic-Classification-with-1D_CNN/4d04527d20493b050aa0da4135e4bf84b5874244/data/6class/VpnSessionL7/train-labels-idx1-ubyte.gz --------------------------------------------------------------------------------