Skip to content

Fix --no-proxy option in minyami #145

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Last-Order
Copy link
Owner

@Last-Order Last-Order commented Feb 26, 2025

Fixes #144

Implement the --no-proxy option to disable the use of proxies, ignoring environment variables.

  • src/utils/agent.ts

    • Add a new method disableProxy to set proxyAgentInstance to null.
    • Update the readProxyConfigurationFromEnv method to check for the --no-proxy option and skip reading proxy settings if it is enabled.
  • src/utils/m3u8.ts

    • Update the axios requests to set the proxy option to false when the --no-proxy option is enabled.
  • src/utils/media.ts

    • Update the axios requests to set the proxy option to false when the --no-proxy option is enabled.
  • src/index.ts

    • Add a check for the --no-proxy option and call the disableProxy method if it is enabled.

For more details, open the Copilot Workspace session.

Fixes #144

Implement the `--no-proxy` option to disable the use of proxies, ignoring environment variables.

* **src/utils/agent.ts**
  - Add a new method `disableProxy` to set `proxyAgentInstance` to `null`.
  - Update the `readProxyConfigurationFromEnv` method to check for the `--no-proxy` option and skip reading proxy settings if it is enabled.

* **src/utils/m3u8.ts**
  - Update the `axios` requests to set the `proxy` option to `false` when the `--no-proxy` option is enabled.

* **src/utils/media.ts**
  - Update the `axios` requests to set the `proxy` option to `false` when the `--no-proxy` option is enabled.

* **src/index.ts**
  - Add a check for the `--no-proxy` option and call the `disableProxy` method if it is enabled.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Last-Order/Minyami/issues/144?shareId=XXXX-XXXX-XXXX-XXXX).
@Last-Order
Copy link
Owner Author

感觉不太好。AI生成的还是差点意思

@Last-Order Last-Order closed this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--no-proxy 选项失效
1 participant