Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ptechgithub/pp-worker
/ functions
Functions
29 in github.com/Ptechgithub/pp-worker
⨍
Functions
29
◇
Types & classes
0
↓ 10 callers
Function
log
(/** @type {string} */ info, /** @type {string | undefined} */ event)
_worker.js:176
↓ 4 callers
Function
safeCloseWebSocket
* Closes a WebSocket connection safely without throwing exceptions. * @param {import("@cloudflare/workers-types").WebSocket} socket The WebSocket co
_worker.js:685
↓ 3 callers
Function
fetch
* @param {import("@cloudflare/workers-types").Request} request * @param {{UUID: string, PROXYIP: string, DNS_RESOLVER_URL: string, NODE_ID: int, AP
_worker.js:36
↓ 2 callers
Function
connectAndWrite
* Connects to a given address and port and writes data to the socket. * @param {string} address The address to connect to. * @param {number} por
_worker.js:355
↓ 2 callers
Function
isValidUUID
* Checks if a given string is a valid UUID. * Note: This is not a real UUID validation. * @param {string} uuid The string to validate as a UUID.
_worker.js:674
↓ 2 callers
Function
remoteSocketToWS
* Converts a remote socket to a WebSocket connection. * @param {import("@cloudflare/workers-types").Socket} remoteSocket The remote socket to conver
_worker.js:584
↓ 1 callers
Function
base64ToArrayBuffer
* Decodes a base64 string into an ArrayBuffer. * @param {string} base64Str The base64 string to decode. * @returns {{earlyData: ArrayBuffer|null,
_worker.js:653
↓ 1 callers
Function
createVLESSSub
(userID_Path, hostName)
_worker.js:907
↓ 1 callers
Function
fetchApiResponse
* Fetches the API response from the server and caches it for future use. * @returns {Promise<object|null>} A Promise that resolves to the API respon
_worker.js:267
↓ 1 callers
Function
getApiResponse
* Returns the cached API response if it exists, otherwise fetches the API response from the server and caches it for future use. * @returns {Promise
_worker.js:300
↓ 1 callers
Function
getVLESSConfig
* * @param {string} userID - single or comma separated userIDs * @param {string | null} hostName * @returns {string}
_worker.js:793
↓ 1 callers
Function
handleTCPOutBound
* Handles outbound TCP connections. * * @param {any} remoteSocket * @param {string} addressRemote The remote address to connect to. * @param
_worker.js:347
↓ 1 callers
Function
handleUDPOutBound
* Handles outbound UDP traffic by transforming the data into DNS queries and sending them over a WebSocket connection. * @param {import("@cloudflare
_worker.js:721
↓ 1 callers
Function
makeReadableWebSocketStream
* Creates a readable stream from a WebSocket server, allowing for data to be read from the WebSocket. * @param {import("@cloudflare/workers-types").
_worker.js:397
↓ 1 callers
Function
processVlessHeader
* Processes the VLESS header buffer and returns an object with the relevant information. * @param {ArrayBuffer} vlessBuffer The VLESS header buffer
_worker.js:456
↓ 1 callers
Function
retry
* Retries connecting to the remote address and port if the Cloudflare socket has no incoming data. * @returns {Promise<void>} A Promise that resolv
_worker.js:373
↓ 1 callers
Function
stringify
(arr, offset = 0)
_worker.js:705
↓ 1 callers
Function
unsafeStringify
(arr, offset = 0)
_worker.js:701
↓ 1 callers
Function
vlessOverWSHandler
* Handles VLESS over WebSocket requests by creating a WebSocket pair, accepting the WebSocket connection, and processing the VLESS header. * @param
_worker.js:169
Function
abort
(reason)
_worker.js:247
Function
cancel
(reason)
_worker.js:428
Function
checkUuidInApiResponse
* Checks if a given UUID is present in the API response. * @param {string} targetUuid The UUID to search for. * @returns {Promise<boolean>} A Prom
_worker.js:312
Function
close
()
_worker.js:244
Function
flush
(controller)
_worker.js:741
Function
getPlanetScaleConnection
* Creates a PlanetScale connection object and returns it. * @param {{DATABASE_HOST: string, DATABASE_USERNAME: string, DATABASE_PASSWORD: string}} e
_worker.js:151
Function
pull
(controller)
_worker.js:423
Function
start
(controller)
_worker.js:400
Function
transform
(chunk, controller)
_worker.js:728
Function
write
(chunk, controller)
_worker.js:192