Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
px3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
px3
Commits
9d83ceb4
Commit
9d83ceb4
authored
Sep 30, 2024
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收集环境
parent
8d7b6a16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
readme.md
readme.md
+72
-0
No files found.
readme.md
View file @
9d83ceb4
# PX3 bypass
主要看src 目录下的代码
run.js 对应 nk
f91.js 对应 f9
一般更新的话 只要改掉 这两个值即可
```
js
class
PxBypass
{
tag
=
"v9.1.1"
ft
=
"339"
}
```
### 运行方式
需要并发启动 看 poolStart.js
```
js
// 配置并发数
const
pool
=
new
ThreadPool
(
5
);
```
ThreadPool.js
```
js
import
{
Worker
}
from
'worker_threads'
;
//主线程
export
class
ThreadPool
{
size
=
5
;
queue
=
[];
workerGroup
=
[];
free
=
0
;
maxFree
=
2
;
monitor
=
null
;
constructor
(
size
)
{
this
.
size
=
size
;
}
//初始化子线程
init
()
{
for
(
let
i
=
0
;
i
<
this
.
size
;
i
++
)
{
this
.
workerGroup
.
push
({
id
:
i
,
status
:
false
,
// 配置要读取哪个代码进行并发
worker
:
new
Worker
(
'./f91.js'
)
});
this
.
workerGroup
[
i
].
worker
.
on
(
"message"
,
(
message
)
=>
{
if
(
message
===
'end'
)
{
this
.
workerGroup
[
i
].
status
=
false
;
this
.
check
();
}
});
}
this
.
monitor
=
setInterval
(()
=>
{
if
(
this
.
isFree
())
{
this
.
free
++
;
console
.
log
(
`空闲次数:
${
this
.
free
}
,如果超过
${
this
.
maxFree
}
次,线程池将关闭,后续提交任务将自动开启`
)
}
else
{
this
.
free
=
0
;
}
this
.
check
();
if
(
this
.
free
>
this
.
maxFree
)
{
this
.
shutdown
();
clearInterval
(
this
.
monitor
);
this
.
monitor
=
null
;
this
.
workerGroup
=
[];
this
.
free
=
0
;
}
},
10000
)
}
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment