db.sql 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. # ************************************************************
  2. # Sequel Pro SQL dump
  3. # Version 4541
  4. #
  5. # http://www.sequelpro.com/
  6. # https://github.com/sequelpro/sequelpro
  7. #
  8. # Host: 127.0.0.1 (MySQL 5.7.18)
  9. # Database: 2
  10. # Generation Time: 2017-07-29 06:28:10 +0000
  11. # ************************************************************
  12. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  13. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  14. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  15. /*!40101 SET NAMES utf8 */;
  16. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  17. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  18. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  19. # Dump of table ss_node
  20. # ------------------------------------------------------------
  21. CREATE TABLE `ss_node` (
  22. `id` int(11) NOT NULL AUTO_INCREMENT,
  23. `name` varchar(128) NOT NULL DEFAULT '' COMMENT '名称',
  24. `server` varchar(128) NOT NULL DEFAULT '' COMMENT '服务器地址',
  25. `method` varchar(32) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  26. `custom_method` varchar(30) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '自定义加密方式',
  27. `protocol` varchar(128) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  28. `protocol_param` varchar(128) DEFAULT '' COMMENT '协议参数',
  29. `obfs` varchar(128) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  30. `obfs_param` varchar(128) DEFAULT '' COMMENT '混淆参数',
  31. `traffic_rate` float NOT NULL DEFAULT '1' COMMENT '流量比率',
  32. `bandwidth` int(11) NOT NULL DEFAULT '100' COMMENT '出口带宽,单位M',
  33. `traffic` bigint(20) NOT NULL DEFAULT '1000' COMMENT '每月可用流量,单位G',
  34. `monitor_url` varchar(255) DEFAULT NULL COMMENT '监控地址',
  35. `compatible` tinyint(4) DEFAULT '0' COMMENT '兼容SS',
  36. `sort` int(3) NOT NULL DEFAULT '0' COMMENT '排序值,值越大越靠前显示',
  37. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-维护、1-正常',
  38. `created_at` datetime NOT NULL,
  39. `updated_at` datetime NOT NULL,
  40. PRIMARY KEY (`id`)
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点信息表';
  42. # Dump of table ss_node_info
  43. # ------------------------------------------------------------
  44. CREATE TABLE `ss_node_info` (
  45. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  46. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  47. `uptime` float NOT NULL COMMENT '更新时间',
  48. `load` varchar(32) NOT NULL COMMENT '负载',
  49. `log_time` int(11) NOT NULL COMMENT '记录时间',
  50. `created_at` datetime NOT NULL,
  51. `updated_at` datetime NOT NULL,
  52. PRIMARY KEY (`id`)
  53. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点负载信息';
  54. # Dump of table ss_node_online_log
  55. # ------------------------------------------------------------
  56. CREATE TABLE `ss_node_online_log` (
  57. `id` int(11) NOT NULL AUTO_INCREMENT,
  58. `node_id` int(11) NOT NULL COMMENT '节点ID',
  59. `online_user` int(11) NOT NULL COMMENT '在线用户数',
  60. `log_time` int(11) NOT NULL COMMENT '记录时间',
  61. `created_at` datetime NOT NULL,
  62. `updated_at` datetime NOT NULL,
  63. PRIMARY KEY (`id`)
  64. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点在线信息';
  65. # Dump of table user
  66. # ------------------------------------------------------------
  67. CREATE TABLE `user` (
  68. `id` int(11) NOT NULL AUTO_INCREMENT,
  69. `username` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '用户名',
  70. `password` varchar(64) NOT NULL DEFAULT '' COMMENT '密码',
  71. `port` int(11) NOT NULL DEFAULT '0' COMMENT 'SS端口',
  72. `passwd` varchar(32) NOT NULL DEFAULT '' COMMENT 'SS密码',
  73. `transfer_enable` bigint(20) NOT NULL DEFAULT '1073741824000' COMMENT '可用流量,单位字节,默认1TiB',
  74. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '已上传流量,单位字节',
  75. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '已下载流量,单位字节',
  76. `t` int(11) NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  77. `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'SS状态',
  78. `method` varchar(30) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  79. `custom_method` varchar(30) DEFAULT 'aes-192-ctr' COMMENT '自定义加密方式',
  80. `protocol` varchar(30) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  81. `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数',
  82. `obfs` varchar(30) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  83. `obfs_param` varchar(255) DEFAULT '' COMMENT '混淆参数',
  84. `speed_limit_per_con` int(255) NOT NULL DEFAULT '204800' COMMENT '单连接限速,默认200M,单位KB',
  85. `speed_limit_per_user` int(255) NOT NULL DEFAULT '204800' COMMENT '单用户限速,默认200M,单位KB',
  86. `wechat` varchar(30) DEFAULT '' COMMENT '微信',
  87. `qq` varchar(20) DEFAULT '' COMMENT 'QQ',
  88. `usage` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他',
  89. `pay_way` tinyint(4) NOT NULL DEFAULT '3' COMMENT '付费方式:1-月付、2-半年付、3-年付',
  90. `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
  91. `enable_time` date DEFAULT NULL COMMENT '开通日期',
  92. `expire_time` date NOT NULL DEFAULT '2099-01-01' COMMENT '过期时间',
  93. `remark` text COMMENT '备注',
  94. `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否管理员:0-否、1-是',
  95. `reg_ip` varchar(20) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
  96. `status` tinyint(11) DEFAULT '0' COMMENT '状态:-1-禁止登陆、0-未激活、1-正常',
  97. `created_at` datetime DEFAULT NULL,
  98. `updated_at` datetime DEFAULT NULL,
  99. PRIMARY KEY (`id`),
  100. UNIQUE KEY `port` (`port`)
  101. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  102. LOCK TABLES `user` WRITE;
  103. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  104. INSERT INTO `user` (`id`, `username`, `password`, `port`, `passwd`, `transfer_enable`, `u`, `d`, `t`, `enable`, `method`, `custom_method`, `protocol`, `protocol_param`, `obfs`, `obfs_param`, `speed_limit_per_con`, `speed_limit_per_user`, `wechat`, `qq`, `usage`, `pay_way`, `balance`, `enable_time`, `expire_time`, `remark`, `is_admin`, `reg_ip`, `created_at`, `updated_at`)
  105. VALUES (1,'admin','e10adc3949ba59abbe56e057f20f883e',10000,'@123',1073741824000,0,0,0,1,'aes-192-ctr','aes-192-ctr','auth_chain_a','','tls1.2_ticket_auth','',204800,204800,'','',1,3,0.00,NULL,'2099-01-01',NULL,1,'127.0.0.1',NULL,NULL);
  106. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  107. UNLOCK TABLES;
  108. # Dump of table user_traffic_log
  109. # ------------------------------------------------------------
  110. CREATE TABLE `user_traffic_log` (
  111. `id` int(11) NOT NULL AUTO_INCREMENT,
  112. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  113. `u` int(11) NOT NULL DEFAULT '0' COMMENT '上传流量',
  114. `d` int(11) NOT NULL DEFAULT '0' COMMENT '下载流量',
  115. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  116. `rate` float NOT NULL COMMENT '流量比例',
  117. `traffic` varchar(32) NOT NULL COMMENT '产生流量',
  118. `log_time` int(11) NOT NULL COMMENT '记录时间',
  119. `created_at` datetime NOT NULL,
  120. `updated_at` datetime NOT NULL,
  121. PRIMARY KEY (`id`)
  122. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  123. -- ----------------------------
  124. -- Table structure for `ss_config`
  125. -- ----------------------------
  126. DROP TABLE IF EXISTS `ss_config`;
  127. CREATE TABLE `ss_config` (
  128. `id` int(11) NOT NULL AUTO_INCREMENT,
  129. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配置名',
  130. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-加密方式、2-协议、3-混淆',
  131. `is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否默认:0-不是、1-是',
  132. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序:值越大排越前',
  133. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  134. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  135. PRIMARY KEY (`id`)
  136. ) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  137. -- ----------------------------
  138. -- Records of ss_config
  139. -- ----------------------------
  140. INSERT INTO `ss_config` VALUES ('1', 'none', '1', '0', '0', '2017-08-01 13:12:23', '2017-08-01 13:12:23');
  141. INSERT INTO `ss_config` VALUES ('2', 'rc4-md5', '1', '0', '0', '2017-08-01 13:12:29', '2017-08-01 13:12:29');
  142. INSERT INTO `ss_config` VALUES ('3', 'bf-cfb', '1', '0', '0', '2017-08-01 13:13:05', '2017-08-01 13:13:05');
  143. INSERT INTO `ss_config` VALUES ('4', 'aes-128-cfb', '1', '0', '0', '2017-08-01 13:13:13', '2017-08-01 13:13:13');
  144. INSERT INTO `ss_config` VALUES ('5', 'aes-192-cfb', '1', '0', '0', '2017-08-01 13:13:25', '2017-08-01 13:13:25');
  145. INSERT INTO `ss_config` VALUES ('6', 'aes-256-cfb', '1', '0', '0', '2017-08-01 13:13:39', '2017-08-01 13:13:39');
  146. INSERT INTO `ss_config` VALUES ('7', 'aes-128-ctr', '1', '0', '0', '2017-08-01 13:13:46', '2017-08-01 13:13:46');
  147. INSERT INTO `ss_config` VALUES ('8', 'aes-192-ctr', '1', '1', '0', '2017-08-01 13:13:53', '2017-08-01 13:13:53');
  148. INSERT INTO `ss_config` VALUES ('9', 'aes-256-ctr', '1', '0', '0', '2017-08-01 13:14:00', '2017-08-01 13:14:00');
  149. INSERT INTO `ss_config` VALUES ('10', 'camellia-128-cfb', '1', '0', '0', '2017-08-01 13:14:08', '2017-08-01 13:14:08');
  150. INSERT INTO `ss_config` VALUES ('11', 'camellia-192-cfb', '1', '0', '0', '2017-08-01 13:14:12', '2017-08-01 13:14:12');
  151. INSERT INTO `ss_config` VALUES ('12', 'camellia-256-cfb', '1', '0', '0', '2017-08-01 13:14:51', '2017-08-01 13:14:51');
  152. INSERT INTO `ss_config` VALUES ('13', 'salsa20', '1', '0', '0', '2017-08-01 13:15:09', '2017-08-01 13:15:09');
  153. INSERT INTO `ss_config` VALUES ('14', 'chacha20', '1', '0', '0', '2017-08-01 13:15:16', '2017-08-01 13:15:16');
  154. INSERT INTO `ss_config` VALUES ('15', 'chacha20-ietf', '1', '0', '0', '2017-08-01 13:15:27', '2017-08-01 13:15:27');
  155. INSERT INTO `ss_config` VALUES ('16', 'chacha20-ietf-poly1305', '1', '0', '0', '2017-08-01 13:15:39', '2017-08-01 13:15:39');
  156. INSERT INTO `ss_config` VALUES ('17', 'chacha20-poly1305', '1', '0', '0', '2017-08-01 13:15:46', '2017-08-01 13:15:46');
  157. INSERT INTO `ss_config` VALUES ('18', 'xchacha-ietf-poly1305', '1', '0', '0', '2017-08-01 13:21:51', '2017-08-01 13:21:51');
  158. INSERT INTO `ss_config` VALUES ('19', 'aes-128-gcm', '1', '0', '0', '2017-08-01 13:22:05', '2017-08-01 13:22:05');
  159. INSERT INTO `ss_config` VALUES ('20', 'aes-192-gcm', '1', '0', '0', '2017-08-01 13:22:12', '2017-08-01 13:22:12');
  160. INSERT INTO `ss_config` VALUES ('21', 'aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:19', '2017-08-01 13:22:19');
  161. INSERT INTO `ss_config` VALUES ('22', 'sodium-aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:32', '2017-08-01 13:22:32');
  162. INSERT INTO `ss_config` VALUES ('23', 'origin', '2', '0', '0', '2017-08-01 13:23:57', '2017-08-01 13:23:57');
  163. INSERT INTO `ss_config` VALUES ('24', 'auth_sha1_v4', '2', '0', '0', '2017-08-01 13:24:41', '2017-08-01 13:24:41');
  164. INSERT INTO `ss_config` VALUES ('25', 'auth_aes128_md5', '2', '0', '0', '2017-08-01 13:24:58', '2017-08-01 13:24:58');
  165. INSERT INTO `ss_config` VALUES ('26', 'auth_aes128_sha1', '2', '0', '0', '2017-08-01 13:25:11', '2017-08-01 13:25:11');
  166. INSERT INTO `ss_config` VALUES ('27', 'auth_chain_a', '2', '1', '0', '2017-08-01 13:25:24', '2017-08-01 13:25:24');
  167. INSERT INTO `ss_config` VALUES ('28', 'auth_chain_b', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');
  168. INSERT INTO `ss_config` VALUES ('29', 'plain', '3', '0', '0', '2017-08-01 13:29:14', '2017-08-01 13:29:14');
  169. INSERT INTO `ss_config` VALUES ('30', 'http_simple', '3', '0', '0', '2017-08-01 13:29:30', '2017-08-01 13:29:30');
  170. INSERT INTO `ss_config` VALUES ('31', 'http_post', '3', '0', '0', '2017-08-01 13:29:38', '2017-08-01 13:29:38');
  171. INSERT INTO `ss_config` VALUES ('32', 'tls1.2_ticket_auth', '3', '1', '0', '2017-08-01 13:29:51', '2017-08-01 13:29:51');
  172. INSERT INTO `ss_config` VALUES ('33', 'tls1.2_ticket_fastauth', '3', '0', '0', '2017-08-01 14:02:19', '2017-08-01 14:02:19');
  173. -- ----------------------------
  174. -- Table structure for `config`
  175. -- ----------------------------
  176. CREATE TABLE `config` (
  177. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  178. `name` varchar(255) NOT NULL DEFAULT '' COMMENT '配置名',
  179. `value` varchar(255) NOT NULL DEFAULT '' COMMENT '配置值',
  180. PRIMARY KEY (`id`)
  181. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  182. -- ----------------------------
  183. -- Records of config
  184. -- ----------------------------
  185. INSERT INTO `config` VALUES ('1', 'is_rand_port', 0);
  186. INSERT INTO `config` VALUES ('2', 'is_user_rand_port', 0);
  187. INSERT INTO `config` VALUES ('3', 'invite_num', 3);
  188. INSERT INTO `config` VALUES ('4', 'is_register', 1);
  189. INSERT INTO `config` VALUES ('5', 'is_invite_register', 1);
  190. INSERT INTO `config` VALUES ('6', 'website_name', 'SSRPanel');
  191. INSERT INTO `config` VALUES ('7', 'is_reset_password', 1);
  192. INSERT INTO `config` VALUES ('8', 'reset_password_times', 3);
  193. INSERT INTO `config` VALUES ('9', 'website_url', 'http://baidu.com');
  194. INSERT INTO `config` VALUES ('10', 'is_active_register', 1);
  195. INSERT INTO `config` VALUES ('11', 'active_times', 3);
  196. -- ----------------------------
  197. -- Table structure for `article`
  198. -- ----------------------------
  199. CREATE TABLE `article` (
  200. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  201. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '文章标题',
  202. `content` text COMMENT '文章内容',
  203. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
  204. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  205. `created_at` datetime DEFAULT NULL,
  206. `updated_at` datetime DEFAULT NULL,
  207. PRIMARY KEY (`id`)
  208. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='文章表';
  209. -- ----------------------------
  210. -- Table structure for `invite`
  211. -- ----------------------------
  212. CREATE TABLE `invite` (
  213. `id` int(11) NOT NULL AUTO_INCREMENT,
  214. `uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人ID',
  215. `fuid` int(11) NOT NULL DEFAULT '0' COMMENT '受邀人ID',
  216. `code` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邀请码',
  217. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '邀请码状态:0-未使用、1-已使用、2-已过期',
  218. `dateline` datetime DEFAULT NULL COMMENT '有效期至',
  219. `created_at` datetime DEFAULT NULL,
  220. `updated_at` datetime DEFAULT NULL,
  221. PRIMARY KEY (`id`)
  222. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邀请码表';
  223. -- ----------------------------
  224. -- Table structure for `verify`
  225. -- ----------------------------
  226. CREATE TABLE `verify` (
  227. `id` int(11) NOT NULL AUTO_INCREMENT,
  228. `user_id` int(11) NOT NULL COMMENT '用户ID',
  229. `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  230. `token` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '校验token',
  231. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  232. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  233. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  234. PRIMARY KEY (`id`)
  235. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  236. -- ----------------------------
  237. -- Table structure for `ss_group`
  238. -- ----------------------------
  239. CREATE TABLE `ss_group` (
  240. `id` int(11) NOT NULL AUTO_INCREMENT,
  241. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  242. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '分组级别',
  243. `created_at` datetime DEFAULT NULL,
  244. `updated_at` datetime DEFAULT NULL,
  245. PRIMARY KEY (`id`)
  246. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  247. -- ----------------------------
  248. -- Table structure for `ss_group_node`
  249. -- ----------------------------
  250. CREATE TABLE `ss_group_node` (
  251. `id` int(11) NOT NULL AUTO_INCREMENT,
  252. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组ID',
  253. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  254. PRIMARY KEY (`id`)
  255. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分组节点关系表';
  256. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  257. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  258. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  259. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  260. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  261. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;