-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
dynamic proxy #10
dynamic proxy #10
Conversation
import { Main } from './components/Main' | ||
|
||
const allProxy = process.env.all_proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have tested it, at least he works on my computer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you inspect it with console.log(process.env)
? it appears that it has been trimmed.
11:37:43.005 {
SUPPORT_PATH: '/Users/tmk/Library/Application Support/com.raycast.macos/extensions/multitranslate',
ASSETS_PATH: '/Users/tmk/.config/raycast/extensions/multitranslate/assets',
COMMAND_NAME: 'translate',
EXTENSION_NAME: 'multitranslate',
LC_ALL: 'en_CN-u-hc-h23-u-ca-gregory-u-nu-latn',
__CF_USER_TEXT_ENCODING: '0x1F6:0x0:0x0',
RAYCAST_BUNDLE_ID: 'com.raycast.macos',
NODE_PATH: '/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules',
NODE_ENV: 'development',
RAYCAST_VERSION: '1.53.2',
TMPDIR: '/var/folders/nx/jwrx4j956f54jg6jphnxd4mr0000gp/T',
HOME: '/Users/tmk'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have tested it, at least he works on my computer
As long as we have configured the terminal proxy, node will read the proxy envs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason not to use enhancement mode? I think it can be quite some overhead if every single tool needs to implement the logic for proxy. |
Because I use the clash software customized by the proxy provider,but it does not have an enhancement mode, it is also the first time I know the existence of the enhancement mode. I think what you said is right that the software should pay attention to the problem of the software |
Description
dynamically reading the proxy environment variables($http_proxy, $https_proxy, $all_proxy) of the terminal to adjust proxy.
Linked Issues
fixes #8