Skip to content

Commit

Permalink
refactor: optimized the outbound order (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
7Sageer committed Sep 13, 2024
1 parent 1f86f48 commit 0cdb6f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ Sublink Worker 是一个可部署在 Cloudflare Worker 上轻量级的订阅转

## 最近更新

- 2024-09-10
- ([#25](https://github.com/7Sageer/sublink-worker/issues/25)) 修复了Base64无法转换多个HTTP链接的问题
- 现在为生成的链接提供二维码
- 2024-09-13
- [#27](https://github.com/7Sageer/sublink-worker/issues/27) 优化了出站选择排布

[查看更新日志](/doc/update-log.md)

Expand Down
4 changes: 4 additions & 0 deletions doc/update-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

## 2024-09-13

- ([#27](https://github.com/7Sageer/sublink-worker/issues/27)) 优化了出站选择排布

## 2024-09-10

- ([#25](https://github.com/7Sageer/sublink-worker/issues/25)) 修复了Base64无法转换多个HTTP的问题
Expand Down
2 changes: 1 addition & 1 deletion src/ClashConfigBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ClashConfigBuilder extends BaseConfigBuilder {
proxies: ['🚀 节点选择', ...proxyList]
});
} else {
this.config['proxy-groups'].push({
this.config['proxy-groups'].unshift({
type: "select",
name: outbound,
proxies: proxyList
Expand Down
4 changes: 2 additions & 2 deletions src/SingboxConfigBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ConfigBuilder extends BaseConfigBuilder {

const proxyList = this.config.outbounds.filter(outbound => outbound?.server != undefined).map(outbound => outbound.tag);

this.config.outbounds.push({
this.config.outbounds.unshift({
type: "urltest",
tag: "⚡ 自动选择",
outbounds: DeepCopy(proxyList),
Expand All @@ -43,7 +43,7 @@ export class ConfigBuilder extends BaseConfigBuilder {
outbounds: ['🚀 节点选择', ...proxyList]
});
} else {
this.config.outbounds.push({
this.config.outbounds.unshift({
type: "selector",
tag: outbound,
outbounds: proxyList
Expand Down

0 comments on commit 0cdb6f4

Please sign in to comment.