sdk: ip限制
This commit is contained in:
23
shared/pubUtils/dictionary/DicWhiteIp.ts
Normal file
23
shared/pubUtils/dictionary/DicWhiteIp.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// 支付回调白名单
|
||||
import {readFileAndParse, parseNumberList, parseGoodStr} from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicWhiteIp {
|
||||
// 渠道
|
||||
readonly channel: string;
|
||||
// ip
|
||||
readonly ip: number;
|
||||
}
|
||||
|
||||
export const dicWhiteIp: string[] = [];
|
||||
export function loadWhiteIp() {
|
||||
dicWhiteIp.splice(0, dicWhiteIp.length);
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_WHITE_IP);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicWhiteIp.push(o.ip);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user