[FEATURE]:Run opencode in private net
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I encountered an error when using opencode on a private network.It seems that opencode is trying to load resources from external networks during startup. { "name": "UnkownError", "data": { "message": "Error: The socket connection was closed unexpectedly. For more information, pass verbose:true in the second argument to fetch()" } } Can make opencode run independently in a private network? With specific externel LLM API ports forward through proxy like nginx, preveventing opencode from communicating with other exeternal networks during startup.
This issue might be a duplicate of existing issues. Please check:
- #8580: linux 启动报错 - The socket connection was closed unexpectedly error
- #7155: [Bug] OpenCode Crashes on Launch When
http_proxyEnvironment Variable is Set - #4924: Is it possible to use proxy?
- #7313: Does OpenCode Require Internet APIs?
- #8642: 在无网络连接的情况下用不了 - Unable to use without network connection
- #7992: opencode connect OpenAI fails
Feel free to ignore if none of these address your specific case.
I've met this problem too. Opencode is requiring model list from https://models.dev, which is not reachable in private network.
If you’re on a private network, I’d use OpenCode Sentinel — it cuts all network access except to your LLM, so it works flawlessly in network-restricted environments 👍👍
Repo: https://github.com/oneoflzx/opencode-sentinel
If you’re on a private network, I’d use OpenCode Sentinel — it cuts all network access except to your LLM, so it works flawlessly in network-restricted environments 👍👍
Repo: https://github.com/oneoflzx/opencode-sentinel
Great,I'll try it.
mark