gen.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import randomstring from "randomstring"
  2. import fs from "fs"
  3. import path from "path"
  4. const subnets = [
  5. "192.168.10",
  6. "192.168.11",
  7. "192.168.12",
  8. "192.168.13",
  9. "192.168.14"
  10. ]
  11. subnets.forEach(subnet => {
  12. fs.writeFileSync(
  13. `${subnet}/US-IPWEB.json`,
  14. JSON.stringify(
  15. Array(300)
  16. .fill(0)
  17. .map((_, i) => {
  18. return [
  19. i,
  20. "gate1.ipweb.cc:7778",
  21. `B_37678_US___10_${randomstring.generate({
  22. length: 8,
  23. charset: "alphanumeric"
  24. })}`,
  25. "123456"
  26. ]
  27. }),
  28. null,
  29. 4
  30. )
  31. )
  32. fs.writeFileSync(
  33. `${subnet}/US-IPMOYU.json`,
  34. JSON.stringify(
  35. Array(300)
  36. .fill(0)
  37. .map((_, i) => {
  38. return [
  39. i,
  40. "global.ipmoyu.com:3000",
  41. `buyerevent_120_0_0_10_${randomstring.generate({
  42. length: 8,
  43. charset: "alphanumeric"
  44. })}_15_1`,
  45. "123456"
  46. ]
  47. }),
  48. null,
  49. 4
  50. )
  51. )
  52. })