Commit 844fadd
committed
feat: auto-select plugin registry based on timezone
Auto-detect timezone and select the geographically closest plugin
registry for faster plugin downloads.
Changes:
1. Add detectPluginRegistry() function to auto-select registry:
- Asia/Shanghai & China → Hangzhou mirror
- Southeast Asia → Singapore mirror
- Americas → North America mirror
- Default → Hangzhou mirror
2. Add PLUGIN_REGISTRY to config file generation
3. Update plugin templates to use PLUGIN_REGISTRY variable:
- scripts/config-template/ai-gateway.sh (ai-proxy, ai-statistics, model-router)
- scripts/config-template/ai-proxy.sh
4. Support manual override via PLUGIN_REGISTRY environment variable
Available registries:
- higress-registry.cn-hangzhou.cr.aliyuncs.com (default)
- higress-registry.ap-southeast-7.cr.aliyuncs.com (Southeast Asia)
- higress-registry.us-west-1.cr.aliyuncs.com (North America)1 parent 25bb17d commit 844fadd
3 files changed
Lines changed: 49 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
89 | 129 | | |
90 | 130 | | |
91 | 131 | | |
| |||
524 | 564 | | |
525 | 565 | | |
526 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
527 | 571 | | |
528 | 572 | | |
529 | 573 | | |
| |||
1318 | 1362 | | |
1319 | 1363 | | |
1320 | 1364 | | |
| 1365 | + | |
1321 | 1366 | | |
1322 | 1367 | | |
1323 | 1368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments