Skip to content

Update Ext/surge outbound switcher #18989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
755a515
Add surge-outbound-switcher extension
the3ash Mar 23, 2025
8399090
update icons & screenshot
the3ash Mar 23, 2025
88bf38d
Update extensions/surge-outbound-switcher/CHANGELOG.md
the3ash Mar 24, 2025
f2ef4eb
Update extensions/surge-outbound-switcher/CHANGELOG.md
the3ash Mar 24, 2025
71eb40f
Update extensions/surge-outbound-switcher/package.json
the3ash Mar 24, 2025
b5c507f
Update extensions/surge-outbound-switcher/src/set-to-rule.ts
the3ash Mar 24, 2025
dede7cf
Update extensions/surge-outbound-switcher/src/utils.ts
the3ash Mar 24, 2025
6293a63
Fix some issues in PR 18065
the3ash Mar 24, 2025
dc4d015
Optimize speed and functionalityt
the3ash Mar 24, 2025
524abe4
Added hint for first error
the3ash Mar 24, 2025
dc5a1a4
- Refactor code structure for better performance\n- Add error message…
the3ash Mar 24, 2025
548babd
fix screenshots path
the3ash Mar 24, 2025
427d7cb
add changelog
the3ash Mar 24, 2025
db189fe
Optimize cache time for first search
the3ash Mar 25, 2025
f3afc67
update README
the3ash Apr 5, 2025
294f76e
Update CHANGELOG.md and optimise images
raycastbot Apr 7, 2025
9da9285
Add store screenshots
the3ash Apr 16, 2025
3c04115
Merge branch 'main' into ext/surge-outbound-switcher
the3ash Apr 16, 2025
b3647bd
Merge branch 'raycast:main' into ext/surge-outbound-switcher
the3ash Apr 17, 2025
2cbe77e
fix changelog
the3ash Apr 17, 2025
c89fe0d
Update CHANGELOG.md and optimise images
raycastbot Apr 17, 2025
452bfa5
chore: tidy up CHANGELOG
the3ash May 6, 2025
b7d2851
Merge branch 'main' into ext/surge-outbound-switcher
the3ash May 6, 2025
0dc1030
style: Add colored emojis to distinguish successful switch toasts
the3ash May 6, 2025
3cd90e3
chore: Update extension icons
the3ash May 6, 2025
a9cefb6
Update CHANGELOG.md
pernielsentikaer May 7, 2025
9c6cfab
Update CHANGELOG.md and optimise images
raycastbot May 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions extensions/surge-outbound-switcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
# Surge Outbound Mode Switcher Changelog

## [Update] - 2025-04-17
## [Update Extension Icons and Toast Indicators] - 2025-05-07

- Add store screenshots

## [Update] - 2025-04-07

- Optimize cache time for first search

## [Update] - 2025-04-07

- Refactor code structure for better performance
- Add error messages
- Update screenshots
- Update extension icons to prevent confusion with Surge app
- Add colored emojis to distinguish successful switch toasts

## [Update] - 2025-04-07
## [Store Screenshots] - 2025-04-17

- Fix TypeScript error: Cannot find name 'showFailureToast'
- Fix screenshot path and configuration
- Fix global mode name

## [Update] - 2025-04-07

- Fix

## [Update] - 2025-04-07

- Updated extension icons and screenshot
- Add store screenshots

## [Initial Version] - 2025-04-07

Expand Down
Binary file modified extensions/surge-outbound-switcher/assets/extension-icon-d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/surge-outbound-switcher/assets/extension-icon-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/surge-outbound-switcher/assets/extension-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extensions/surge-outbound-switcher/assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions extensions/surge-outbound-switcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@
{
"name": "set-outbound-mode",
"title": "Set Outbound Mode",
"subtitle": "Surge",
"subtitle": "Surge Outbound Switcher",
"description": "Set Surge's outbound mode",
"mode": "view",
"icon": "extension-icon.png"
},
{
"name": "set-to-direct",
"title": "Set to Direct",
"subtitle": "Surge",
"subtitle": "Surge Outbound Switcher",
"description": "Set Surge's outbound mode to Direct",
"mode": "no-view",
"icon": "extension-icon-d.png"
},
{
"name": "set-to-global",
"title": "Set to Global",
"subtitle": "Surge",
"subtitle": "Surge Outbound Switcher",
"description": "Set Surge's outbound mode to Global",
"mode": "no-view",
"icon": "extension-icon-g.png"
},
{
"name": "set-to-rule-based",
"title": "Set to Rule-based",
"subtitle": "Surge",
"subtitle": "Surge Outbound Switcher",
"description": "Set Surge's outbound mode to Rule-based",
"mode": "no-view",
"icon": "extension-icon-r.png"
Expand Down
5 changes: 4 additions & 1 deletion extensions/surge-outbound-switcher/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,19 @@ const outboundModes = {
english: "Direct Outbound",
chinese: "直接连接",
name: "Direct",
emoji: "⚪️",
},
Global: {
english: "Global Proxy",
chinese: "全局代理",
name: "Global",
emoji: "🟢",
},
Rule: {
english: "Rule-Based Proxy",
chinese: "规则判定",
name: "Rule-Based",
emoji: "🔵",
},
};

Expand Down Expand Up @@ -731,7 +734,7 @@ export async function setSurgeOutboundMode(mode: "Direct" | "Global" | "Rule"):
lastHitTimestamp: Date.now(),
};

await showHUD(`🌐 Set to ${modeConfig.name} Mode`);
await showHUD(`${modeConfig.emoji} Set to ${modeConfig.name} Mode`);
} catch (error) {
// Handle errors and show failure notification
console.error(`🔴 Error setting to ${outboundModes[mode].name} mode:`, error);
Expand Down