Skip to content

Commit

Permalink
Support Shadowsocks AEAD multiuser in a port
Browse files Browse the repository at this point in the history
  • Loading branch information
crossfw committed Feb 14, 2021
1 parent da10a74 commit b86b575
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Models/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,15 @@ static function ($query) use ($user) {
if ($mu_user == null) {
return null;
}
$mu_user->obfs_param = $user->getMuMd5();
$mu_user->protocol_param = $user->id . ':' . $user->passwd;
// 如果混淆和协议均为SS原生且为单端口的,即判断为AEAD单端口类型,密码配置为用户自身密码
if ($mu_user->obfs == "plain" && $mu_user->protocol == "origin"){
$mu_user->passwd = $user->passwd;
$mu_user->obfs_param = "";
$mu_user->protocol_param = "";
}else{
$mu_user->obfs_param = $user->getMuMd5();
$mu_user->protocol_param = $user->id . ':' . $user->passwd;
}
$user = $mu_user;
$node_name .= ($_ENV['disable_sub_mu_port'] ? '' : ' - ' . $mu_port . ' 单端口');
}
Expand Down

0 comments on commit b86b575

Please sign in to comment.