Browse Source

chore: drop unused user value

M1Screw 1 year ago
parent
commit
f721664594

+ 35 - 35
composer.lock

@@ -124,16 +124,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.300.13",
+            "version": "3.300.14",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "b1eb7307d30ebcfa4e156971f658c2d177434db3"
+                "reference": "f1e0c37d8403d7097c2c808c184137e6517d54be"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b1eb7307d30ebcfa4e156971f658c2d177434db3",
-                "reference": "b1eb7307d30ebcfa4e156971f658c2d177434db3",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f1e0c37d8403d7097c2c808c184137e6517d54be",
+                "reference": "f1e0c37d8403d7097c2c808c184137e6517d54be",
                 "shasum": ""
             },
             "require": {
@@ -213,9 +213,9 @@
             "support": {
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.300.13"
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.300.14"
             },
-            "time": "2024-03-07T19:14:04+00:00"
+            "time": "2024-03-08T19:05:39+00:00"
         },
         {
             "name": "bacon/bacon-qr-code",
@@ -1973,16 +1973,16 @@
         },
         {
             "name": "mailgun/mailgun-php",
-            "version": "v4.1.0",
+            "version": "v4.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mailgun/mailgun-php.git",
-                "reference": "85e598f9d0a62a978c668b689cc2169f0a4d2c59"
+                "reference": "6e31693370a254522118b9961ca675823c76c3c0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/85e598f9d0a62a978c668b689cc2169f0a4d2c59",
-                "reference": "85e598f9d0a62a978c668b689cc2169f0a4d2c59",
+                "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/6e31693370a254522118b9961ca675823c76c3c0",
+                "reference": "6e31693370a254522118b9961ca675823c76c3c0",
                 "shasum": ""
             },
             "require": {
@@ -2028,9 +2028,9 @@
             "description": "The Mailgun SDK provides methods for all API functions.",
             "support": {
                 "issues": "https://github.com/mailgun/mailgun-php/issues",
-                "source": "https://github.com/mailgun/mailgun-php/tree/v4.1.0"
+                "source": "https://github.com/mailgun/mailgun-php/tree/v4.2.0"
             },
-            "time": "2024-02-10T13:46:20+00:00"
+            "time": "2024-03-09T11:07:21+00:00"
         },
         {
             "name": "maxmind-db/reader",
@@ -7254,16 +7254,16 @@
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "10.1.12",
+            "version": "10.1.13",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63"
+                "reference": "d51c3aec14896d5e80b354fad58e998d1980f8f8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/842f72662d6b9edda84c4b6f13885fd9cd53dc63",
-                "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d51c3aec14896d5e80b354fad58e998d1980f8f8",
+                "reference": "d51c3aec14896d5e80b354fad58e998d1980f8f8",
                 "shasum": ""
             },
             "require": {
@@ -7320,7 +7320,7 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
                 "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
-                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.12"
+                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.13"
             },
             "funding": [
                 {
@@ -7328,7 +7328,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2024-03-02T07:22:05+00:00"
+            "time": "2024-03-09T16:54:15+00:00"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -7575,16 +7575,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "10.5.11",
+            "version": "10.5.12",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4"
+                "reference": "41a9886b85ac7bf3929853baf96b95361cd69d2b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4",
-                "reference": "0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/41a9886b85ac7bf3929853baf96b95361cd69d2b",
+                "reference": "41a9886b85ac7bf3929853baf96b95361cd69d2b",
                 "shasum": ""
             },
             "require": {
@@ -7656,7 +7656,7 @@
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.11"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.12"
             },
             "funding": [
                 {
@@ -7672,7 +7672,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-02-25T14:05:00+00:00"
+            "time": "2024-03-09T12:04:07+00:00"
         },
         {
             "name": "psr/cache",
@@ -8641,32 +8641,32 @@
         },
         {
             "name": "slevomat/coding-standard",
-            "version": "8.14.1",
+            "version": "8.15.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/slevomat/coding-standard.git",
-                "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926"
+                "reference": "7d1d957421618a3803b593ec31ace470177d7817"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926",
-                "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926",
+                "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817",
+                "reference": "7d1d957421618a3803b593ec31ace470177d7817",
                 "shasum": ""
             },
             "require": {
                 "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0",
                 "php": "^7.2 || ^8.0",
                 "phpstan/phpdoc-parser": "^1.23.1",
-                "squizlabs/php_codesniffer": "^3.7.1"
+                "squizlabs/php_codesniffer": "^3.9.0"
             },
             "require-dev": {
                 "phing/phing": "2.17.4",
                 "php-parallel-lint/php-parallel-lint": "1.3.2",
-                "phpstan/phpstan": "1.10.37",
+                "phpstan/phpstan": "1.10.60",
                 "phpstan/phpstan-deprecation-rules": "1.1.4",
-                "phpstan/phpstan-phpunit": "1.3.14",
-                "phpstan/phpstan-strict-rules": "1.5.1",
-                "phpunit/phpunit": "8.5.21|9.6.8|10.3.5"
+                "phpstan/phpstan-phpunit": "1.3.16",
+                "phpstan/phpstan-strict-rules": "1.5.2",
+                "phpunit/phpunit": "8.5.21|9.6.8|10.5.11"
             },
             "type": "phpcodesniffer-standard",
             "extra": {
@@ -8690,7 +8690,7 @@
             ],
             "support": {
                 "issues": "https://github.com/slevomat/coding-standard/issues",
-                "source": "https://github.com/slevomat/coding-standard/tree/8.14.1"
+                "source": "https://github.com/slevomat/coding-standard/tree/8.15.0"
             },
             "funding": [
                 {
@@ -8702,7 +8702,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-10-08T07:28:08+00:00"
+            "time": "2024-03-09T15:20:58+00:00"
         },
         {
             "name": "squizlabs/php_codesniffer",

+ 0 - 20
config/settings.json

@@ -1149,26 +1149,6 @@
         "default": "0",
         "mark": "邮箱验证"
     },
-    {
-        "id": null,
-        "item": "reg_forbidden_ip",
-        "value": "127.0.0.0/8,::1/128",
-        "class": "reg",
-        "is_public": 0,
-        "type": "string",
-        "default": "127.0.0.0/8,::1/128",
-        "mark": "注册时默认禁止访问IP列表"
-    },
-    {
-        "id": null,
-        "item": "reg_forbidden_port",
-        "value": "",
-        "class": "reg",
-        "is_public": 0,
-        "type": "string",
-        "default": "",
-        "mark": "注册时默认禁止访问端口列表"
-    },
     {
         "id": null,
         "item": "random_group",

+ 8 - 9
db/migrations/2023020100-init.php

@@ -161,8 +161,8 @@ return new class() implements MigrationInterface {
                 `bandwidthlimit_resetday` tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT '流量重置日',
                 `node_heartbeat` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '节点心跳',
                 `online_user` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '节点在线用户',
-                `ipv4` INET4 NOT NULL DEFAULT '127.0.0.1' COMMENT 'IPv4地址',
-                `ipv6` INET6 NOT NULL DEFAULT '::1' COMMENT 'IPv6地址',
+                `ipv4` inet4 NOT NULL DEFAULT '127.0.0.1' COMMENT 'IPv4地址',
+                `ipv6` inet6 NOT NULL DEFAULT '::1' COMMENT 'IPv6地址',
                 `node_group` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT '节点群组',
                 `online` tinyint(1) NOT NULL DEFAULT 1 COMMENT '在线状态',
                 `gfw_block` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否被GFW封锁',
@@ -287,10 +287,10 @@ return new class() implements MigrationInterface {
             CREATE TABLE `user` (
                 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
                 `user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
-                `email` varchar(255) NOT NULL COMMENT 'E-Mail',
+                `email` varchar(255) NOT NULL COMMENT '用户Email',
                 `pass` varchar(255) NOT NULL COMMENT '登录密码',
-                `passwd` varchar(255) NOT NULL COMMENT '节点密码',
-                `uuid` char(36) NOT NULL COMMENT 'UUID',
+                `passwd` varchar(255) NOT NULL COMMENT '连接密码',
+                `uuid` uuid NOT NULL COMMENT 'UUID',
                 `u` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '账户当前上传流量',
                 `d` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '账户当前下载流量',
                 `transfer_today` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '账户今日所用流量',
@@ -305,7 +305,7 @@ return new class() implements MigrationInterface {
                 `reg_date` datetime NOT NULL DEFAULT '1989-06-04 00:05:00' COMMENT '注册时间',
                 `money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '账户余额',
                 `ref_by` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '邀请人ID',
-                `method` varchar(255) NOT NULL DEFAULT 'aes-128-gcm' COMMENT 'Shadowsocks加密方式',
+                `method` varchar(255) NOT NULL DEFAULT 'aes-128-gcm' COMMENT '加密方式',
                 `reg_ip` varchar(255) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
                 `node_speedlimit` double NOT NULL DEFAULT 0 COMMENT '用户限速',
                 `node_iplimit` smallint(6) unsigned NOT NULL DEFAULT 0 COMMENT '同时可连接IP数',
@@ -326,16 +326,15 @@ return new class() implements MigrationInterface {
                 `is_shadow_banned` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否处于账户异常状态',
                 `expire_notified` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '过期提醒',
                 `traffic_notified` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '流量提醒',
-                `forbidden_ip` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问IP',
-                `forbidden_port` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问端口',
                 `auto_reset_day` smallint(6) unsigned NOT NULL DEFAULT 0 COMMENT '自动重置流量日',
                 `auto_reset_bandwidth` decimal(12,2) unsigned NOT NULL DEFAULT 0 COMMENT '自动重置流量',
-                `api_token` char(36) NOT NULL DEFAULT '' COMMENT 'API 密钥',
+                `api_token` varchar(255) NOT NULL DEFAULT '' COMMENT 'API 密钥',
                 `is_dark_mode` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否启用暗黑模式',
                 `is_inactive` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否处于闲置状态',
                 `locale` varchar(16) NOT NULL DEFAULT 'zh-TW' COMMENT '显示语言',
                 PRIMARY KEY (`id`),
                 UNIQUE KEY `email` (`email`),
+                UNIQUE KEY `passwd` (`passwd`),
                 UNIQUE KEY `uuid` (`uuid`),
                 UNIQUE KEY `ga_token` (`ga_token`),
                 UNIQUE KEY `api_token` (`api_token`),

+ 0 - 2
db/migrations/2023060300-add_user_locale_and_update_data_type.php

@@ -42,8 +42,6 @@ return new class() implements MigrationInterface {
         ALTER TABLE user MODIFY COLUMN `banned_reason` varchar(255) NOT NULL DEFAULT '' COMMENT '封禁理由';
         ALTER TABLE user MODIFY COLUMN `expire_notified` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '过期提醒';
         ALTER TABLE user MODIFY COLUMN `traffic_notified` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '流量提醒';
-        ALTER TABLE user MODIFY COLUMN `forbidden_ip` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问IP';
-        ALTER TABLE user MODIFY COLUMN `forbidden_port` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问端口';
         ALTER TABLE user MODIFY COLUMN `auto_reset_day` smallint(6) unsigned NOT NULL DEFAULT 0 COMMENT '自动重置流量日';
         ALTER TABLE user MODIFY COLUMN `auto_reset_bandwidth` decimal(12,2) unsigned NOT NULL DEFAULT 0.00 COMMENT '自动重置流量';
         ALTER TABLE user MODIFY COLUMN `is_dark_mode` tinyint(1) NOT NULL DEFAULT 0;

+ 33 - 0
db/migrations/2024031000-remove_user_forbidden.php

@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+use App\Interfaces\MigrationInterface;
+use App\Services\DB;
+
+return new class() implements MigrationInterface {
+    public function up(): int
+    {
+        DB::getPdo()->exec("
+            ALTER TABLE user DROP COLUMN IF EXISTS `forbidden_ip`;
+            ALTER TABLE user DROP COLUMN IF EXISTS `forbidden_port`;
+            ALTER TABLE user MODIFY COLUMN `api_token` varchar(255) NOT NULL DEFAULT '' COMMENT 'API Token';
+            ALTER TABLE user MODIFY COLUMN `uuid` uuid NOT NULL COMMENT 'UUID';
+            ALTER TABLE user ADD UNIQUE KEY IF NOT EXISTS `passwd` (`passwd`);
+        ");
+
+        return 2024031000;
+    }
+
+    public function down(): int
+    {
+        DB::getPdo()->exec("
+            ALTER TABLE user ADD COLUMN IF NOT EXISTS `forbidden_ip` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问IP';
+            ALTER TABLE user ADD COLUMN IF NOT EXISTS `forbidden_port` varchar(255) NOT NULL DEFAULT '' COMMENT '禁止访问端口';
+            ALTER TABLE user MODIFY COLUMN `api_token` char(36) NOT NULL DEFAULT '' COMMENT 'API 密钥';
+            ALTER TABLE user MODIFY COLUMN `uuid` char(36) NOT NULL COMMENT 'UUID';
+        ");
+
+        return 2024030300;
+    }
+};

+ 0 - 14
resources/views/tabler/admin/setting/reg.tpl

@@ -180,20 +180,6 @@
                                                        value="{$settings['reg_speed_limit']}">
                                             </div>
                                         </div>
-                                        <div class="form-group mb-3 row">
-                                            <label class="form-label col-3 col-form-label">禁止访问的 IP 列表</label>
-                                            <div class="col">
-                                                <input id="reg_forbidden_ip" type="text" class="form-control"
-                                                       value="{$settings['reg_forbidden_ip']}">
-                                            </div>
-                                        </div>
-                                        <div class="form-group mb-3 row">
-                                            <label class="form-label col-3 col-form-label">禁止访问的端口列表</label>
-                                            <div class="col">
-                                                <input id="reg_forbidden_port" type="text" class="form-control"
-                                                       value="{$settings['reg_forbidden_port']}">
-                                            </div>
-                                        </div>
                                     </div>
                                 </div>
                             </div>

+ 47 - 64
resources/views/tabler/admin/user/edit.tpl

@@ -92,6 +92,45 @@
                                            value="{$edit_user->auto_reset_bandwidth}">
                                 </div>
                             </div>
+                            <div class="hr-text">
+                                <span>邀请注册</span>
+                            </div>
+                            <div class="form-group mb-3 row">
+                                <label class="form-label col-4 col-form-label">邀请人</label>
+                                <div class="col">
+                                    <input id="ref_by" type="text" class="form-control" value="{$edit_user->ref_by}">
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-md-4 col-sm-12">
+                    <div class="card">
+                        <div class="card-header card-header-light">
+                            <h3 class="card-title">其他信息</h3>
+                        </div>
+                        <div class="card-body">
+                            <div class="form-group mb-3 row">
+                                <label class="form-label col-4 col-form-label">流量限制</label>
+                                <div class="col">
+                                    <input id="transfer_enable" type="text" class="form-control"
+                                           value="{$edit_user->enableTraffic()}">
+                                </div>
+                            </div>
+                            <div class="form-group mb-3 row">
+                                <label class="form-label col-4 col-form-label">当期用量</label>
+                                <div class="col">
+                                    <input id="usedTraffic" type="text" class="form-control"
+                                           value="{$edit_user->usedTraffic()}" disabled/>
+                                </div>
+                            </div>
+                            <div class="form-group mb-3 row">
+                                <label class="form-label col-4 col-form-label">累计用量</label>
+                                <div class="col">
+                                    <input id="usedTraffic" type="text" class="form-control"
+                                           value="{$edit_user->totalTraffic()}" disabled/>
+                                </div>
+                            </div>
                             <div class="hr-text">
                                 <span>高级选项</span>
                             </div>
@@ -142,41 +181,29 @@
                 <div class="col-md-4 col-sm-12">
                     <div class="card">
                         <div class="card-header card-header-light">
-                            <h3 class="card-title">其他信息</h3>
+                            <h3 class="card-title">连接设置</h3>
                         </div>
                         <div class="card-body">
                             <div class="form-group mb-3 row">
-                                <label class="form-label col-4 col-form-label">流量限制</label>
-                                <div class="col">
-                                    <input id="transfer_enable" type="text" class="form-control"
-                                           value="{$edit_user->enableTraffic()}">
-                                </div>
-                            </div>
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-4 col-form-label">当期用量</label>
+                                <label class="form-label col-3 col-form-label">端口</label>
                                 <div class="col">
-                                    <input id="usedTraffic" type="text" class="form-control"
-                                           value="{$edit_user->usedTraffic()}" disabled/>
+                                    <input id="port" type="text" class="form-control" value="{$edit_user->port}">
                                 </div>
                             </div>
                             <div class="form-group mb-3 row">
-                                <label class="form-label col-4 col-form-label">累计用量</label>
+                                <label class="form-label col-3 col-form-label">密码</label>
                                 <div class="col">
-                                    <input id="usedTraffic" type="text" class="form-control"
-                                           value="{$edit_user->totalTraffic()}" disabled/>
+                                    <input id="passwd" type="text" class="form-control" value="{$edit_user->passwd}" disabled/>
                                 </div>
                             </div>
-                            <div class="hr-text">
-                                <span>邀请注册</span>
-                            </div>
                             <div class="form-group mb-3 row">
-                                <label class="form-label col-4 col-form-label">邀请人</label>
+                                <label class="form-label col-3 col-form-label">加密</label>
                                 <div class="col">
-                                    <input id="ref_by" type="text" class="form-control" value="{$edit_user->ref_by}">
+                                    <input id="method" type="text" class="form-control" value="{$edit_user->method}">
                                 </div>
                             </div>
                             <div class="hr-text">
-                                <span>划分与使用限制</span>
+                                <span>使用限制</span>
                             </div>
                             <div class="form-group mb-3 col-12">
                                 <label class="form-label col-12 col-form-label">节点群组</label>
@@ -208,50 +235,6 @@
                         </div>
                     </div>
                 </div>
-                <div class="col-md-4 col-sm-12">
-                    <div class="card">
-                        <div class="card-header card-header-light">
-                            <h3 class="card-title">连接设置</h3>
-                        </div>
-                        <div class="card-body">
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-3 col-form-label">端口</label>
-                                <div class="col">
-                                    <input id="port" type="text" class="form-control" value="{$edit_user->port}">
-                                </div>
-                            </div>
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-3 col-form-label">密码</label>
-                                <div class="col">
-                                    <input id="passwd" type="text" class="form-control" value="{$edit_user->passwd}" disabled/>
-                                </div>
-                            </div>
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-3 col-form-label">加密</label>
-                                <div class="col">
-                                    <input id="method" type="text" class="form-control" value="{$edit_user->method}">
-                                </div>
-                            </div>
-                            <div class="hr-text">
-                                <span>访问限制</span>
-                            </div>
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-3 col-form-label">IP / CIDR</label>
-                                <div class="col">
-                                    <textarea id="forbidden_ip" class="col form-control"
-                                              rows="2">{$edit_user->forbidden_ip}</textarea>
-                                </div>
-                            </div>
-                            <div class="form-group mb-3 row">
-                                <label class="form-label col-3 col-form-label">PORT</label>
-                                <div class="col">
-                                    <textarea id="forbidden_port" class="col form-control"
-                                              rows="2">{$edit_user->forbidden_port}</textarea>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
             </div>
         </div>
     </div>

+ 0 - 2
src/Controllers/Admin/Setting/RegController.php

@@ -25,8 +25,6 @@ final class RegController extends BaseController
         'reg_method',
         'reg_ip_limit',
         'reg_speed_limit',
-        'reg_forbidden_ip',
-        'reg_forbidden_port',
     ];
 
     /**

+ 0 - 6
src/Controllers/Admin/UserController.php

@@ -14,8 +14,6 @@ use Exception;
 use Psr\Http\Message\ResponseInterface;
 use Slim\Http\Response;
 use Slim\Http\ServerRequest;
-use function str_replace;
-use const PHP_EOL;
 
 final class UserController extends BaseController
 {
@@ -87,8 +85,6 @@ final class UserController extends BaseController
         'port',
         'passwd',
         'method',
-        'forbidden_ip',
-        'forbidden_port',
     ];
 
     /**
@@ -202,8 +198,6 @@ final class UserController extends BaseController
         $user->node_iplimit = $request->getParam('node_iplimit');
         $user->port = $request->getParam('port');
         $user->method = $request->getParam('method');
-        $user->forbidden_ip = str_replace(PHP_EOL, ',', $request->getParam('forbidden_ip'));
-        $user->forbidden_port = str_replace(PHP_EOL, ',', $request->getParam('forbidden_port'));
 
         if (! $user->save()) {
             return $response->withJson([

+ 0 - 2
src/Controllers/AuthController.php

@@ -221,8 +221,6 @@ final class AuthController extends BaseController
         $user->u = 0;
         $user->d = 0;
         $user->method = $configs['reg_method'];
-        $user->forbidden_ip = Config::obtain('reg_forbidden_ip');
-        $user->forbidden_port = Config::obtain('reg_forbidden_port');
         $user->im_type = $imtype;
         $user->im_value = $imvalue;
         $user->transfer_enable = Tools::toGB($configs['reg_traffic']);