Skip to content

Commit

Permalink
Merge pull request #1206 from crossfw/ss-sub
Browse files Browse the repository at this point in the history
Support Shadowsocks AEAD multiuser in a port
  • Loading branch information
Anankke authored Feb 14, 2021
2 parents b3c6d9c + b86b575 commit 232c87c
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 232c87c

Please sign in to comment.