Export Functions (Server-side)
ส่งออกฟังก์ชันเพื่อให้สามารถเรียกใช้จากทรัพยากรอื่นได้ทางฝั่ง Server
executeCommand
เรียกใช้งาน คำสั่งต่างๆ ของทรัพยากรนี้
- Usage
- Example
exports.azael_connshield:executeCommand(subCommandKey, args)
local success, response = exports.azael_connshield:executeCommand('addBypass', { 'steam:1100001332e7216', 'all' })
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
Arguments
- subCommandKey:
string- คีย์ของ คำสั่งย่อย (ดูคีย์ได้ที่ Subcommand List)
- args:
table<{ [index]: any }>|nil- ข้อมูลที่คำสั่งต้องการ
Returns
- success:
boolean- สถานะการใช้งานคำสั่ง
- response:
table<{ [key]: any }>- ข้อมูลตอบกลับของคำสั่ง
รายละเอียดข้อมูลตอบกลับของคำสั่ง
Success
ข้อมูลตอบกลับเมื่อใช้คำสั่งสำเร็จ คุณสามารถดูรายละเอียดได้ที่ respHandler
Failed
ข้อมูลตอบกลับเมื่อใช้คำสั่งล้มเหลว
| Field | Type | Description |
|---|---|---|
type | string | ประเภทของข้อผิดพลาด |
message | string | ข้อความของข้อผิดพลาด |
Subcommand List
| Key | Label |
|---|---|
addBypass | เพิ่มสิทธิ์ข้ามกฎการตรวจสอบ |
removeBypass | ลบสิทธิ์ข้ามกฎการตรวจสอบ |
addBypass
เพิ่มสิทธิ์ข้ามกฎการตรวจสอบให้กับผู้เล่น
- Usage
- Example
exports.azael_connshield:addBypass(identifier, bypassOptions)
local success, response = exports.azael_connshield:addBypass('steam:1100001332e7216', 'all')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print('Identifier:', response.identifier)
print('Bypass Types:', json.encode(response.bypassTypes))
Arguments
- identifier:
string- ตัวระบุของผู้เล่น โดยต้องมีคำนำหน้าตรงกับประเภท identifierUniqueness.provider เช่น
steam:1100001332e7216
- ตัวระบุของผู้เล่น โดยต้องมีคำนำหน้าตรงกับประเภท identifierUniqueness.provider เช่น
- bypassOptions:
string|nil- ประเภทการข้ามที่ต้องการเพิ่ม (
all,id,ip) ค่าเริ่มต้น:all
- ประเภทการข้ามที่ต้องการเพิ่ม (
Returns
- success:
boolean- สถานะการดำเนินการ
- response:
table<{ [key]: any }>- ข้อมูลตอบกลับ
รายละเอียดข้อมูลตอบกลับ
Success
| Field | Type | Description |
|---|---|---|
identifier | string | ตัวระบุผู้เล่น |
bypassTypes | string[] | ประเภทของ bypass ที่ถูกเพิ่ม |
Failed
| Field | Type | Description |
|---|---|---|
type | string | ประเภทของข้อผิดพลาด |
message | string | ข้อความของข้อผิดพลาด |
removeBypass
ลบสิทธิ์ข้ามกฎการตรวจสอบของผู้เล่น
- Usage
- Example
exports.azael_connshield:removeBypass(identifier, bypassOptions)
local success, response = exports.azael_connshield:removeBypass('steam:1100001332e7216', 'all')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print('Identifier:', response.identifier)
print('Removed Bypass Types:', json.encode(response.bypassTypes))
Arguments
- identifier:
string- ตัวระบุของผู้เล่น โดยต้องมีคำนำหน้าตรงกับประเภท identifierUniqueness.provider เช่น
steam:1100001332e7216
- ตัวระบุของผู้เล่น โดยต้องมีคำนำหน้าตรงกับประเภท identifierUniqueness.provider เช่น
- bypassOptions:
string|nil- ประเภทการข้ามที่ต้องการลบ (
all,id,ip) ค่าเริ่มต้น:all
- ประเภทการข้ามที่ต้องการลบ (
Returns
- success:
boolean- สถานะการดำเนินการ
- response:
table<{ [key]: any }>- ข้อมูลตอบกลับ
รายละเอียดข้อมูลตอบกลับ
Success
| Field | Type | Description |
|---|---|---|
identifier | string | ตัวระบุผู้เล่น |
bypassTypes | string[] | ประเภทของ bypass ที่ถูกลบออก |
Failed
| Field | Type | Description |
|---|---|---|
type | string | ประเภทของข้อผิดพลาด |
message | string | ข้อความของข้อผิดพลาด |
checkIp
ตรวจสอบความน่าเชื่อถือของที่อยู่ IP
- Usage
- Example
exports.azael_connshield:checkIp(ipAddress)
local result, err = exports.azael_connshield:checkIp('127.0.0.1')
if err then
return print('Error:', err)
end
print('VPN:', result.isVPN)
print('Proxy:', result.isProxy)
print('Country:', result.country, '(' .. result.isoCode .. ')')
print('Blocked:', result.blocked)
Arguments
- ipAddress:
string- ที่อยู่ IP ที่ต้องการตรวจสอบ (เช่น
ip:127.0.0.1หรือ127.0.0.1)
- ที่อยู่ IP ที่ต้องการตรวจสอบ (เช่น
Returns
-
result:
table|nil- ผลลัพธ์การตรวจสอบ
Field Type Description isVPNbooleanตรวจพบว่าเป็น VPN isProxybooleanตรวจพบว่าเป็น Proxy countrystring?ประเทศที่ตรวจพบ isoCodestring?รหัสประเทศ ISO riskScoreintegerคะแนนความเสี่ยง confidenceScoreintegerคะแนนความมั่นใจ blockedbooleanผลลัพธ์ว่าถูกบล็อกหรือไม่ blockReasonstring?เหตุผลที่ถูกบล็อก -
error:
string|nil- ข้อความข้อผิดพลาด (ถ้ามี)