Closed loveloki closed 1 month ago
@loveloki can you elaborate a bit more?
Can you provider more insights into your setup and what's the desired solution?
@Tpuljak
In linux and macos, export all_proxy=<proxy_url>
is usually used.
In windows usually use $env:HTTP_PROXY=<proxy_url>
.
In GUI programs that support proxy, a proxy settings page is usually provided.
such as telegram:
So ideally we can provide a daytona proxy set <proxy_url>
and daytona proxy unset
commands to set and cancel the proxy.
like this:
# set proxy
daytona proxy set 127.0.0.1:7890
# unset proxy
daytona proxy unset
Or can read the all_proxy
| http_proxy
environment variable of the operating system, but this method seems to increase complexity.
@loveloki what would the proxy be used for exactly?
Also, can you please describe the network issues that a proxy might solve? We're having a hard time grasping which requests that Daytona makes would make sense to forward through a proxy.
@Tpuljak
Sorry I didn't describe it clearly.
In my case is this:
$ daytona serve
INFO[0000] Starting Daytona server
INFO[0000] Starting local container registry
INFO[0000] Pulling image...
FATA[0015] Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
After turning on the global proxy on the machine:
$ daytona serve
INFO[0000] Starting Daytona server
INFO[0000] Starting local container registry
INFO[0000] Pulling image...
INFO[0003] 2.8.3: Pulling from library/registry
720f3032cd11: Pull complete
d259642272e5: Pull complete
6e496f333012: Pull complete
e961822193ae: Pull complete
b98a2db964ee: Pull complete
Digest: sha256:ac0192b549007e22998eb74e8d8488dcfe70f1489520c3b144a6047ac5efbe90
INFO[0008] Status: Downloaded newer image for registry:2.8.3
INFO[0008] Image pulled successfully
INFO[0025] Downloading default providers
INFO[0025] Default providers downloaded
INFO[0025] Registering providers
INFO[0026] Provider docker-provider registered
INFO[0026] Setting default targets
INFO[0026] Target local already exists. Skipping...
INFO[0026] Default targets set
INFO[0026] Provider docker-provider initialized
INFO[0026] Providers registered
INFO[0026] Starting api server on port 3986
INFO[0027] API REQUEST URI=/health latency="163.917µs" method=GET status=200
Daytona
## Daytona Server is running on port: 3986
===
You may now begin developing
From the logs, at least docker pull will encounter network problems, but I don't know whether it will still encounter network problems later.
So what I want is to provide a global proxy that passes all traffic through the proxy, it's mean all requests that Daytona through the proxy. Because the proxy software will do traffic diversion generally.
After testing, it works fine if you only temporarily set the proxy in the terminal like export all_proxy=<proxy_url>
on linux, but I not clear whether it can be executed normally for other scenarios such as prebuild
but this way not work on macos.
@loveloki sorry for the delay in the response.
Because Daytona depends on a lot of different libraries, I don't see how we could implement a "global" proxy efficiently and being sure we covered all the bases. E.g. most of the git providers have their own lib for making requests.
After testing, it works fine if you only temporarily set the proxy in the terminal like export all_proxy=
on linux, but I not clear whether it can be executed normally for other scenarios such as prebuild
I believe that this would be the right approach in your scenario since it enables the proxy on a system level. Because prebuilds and basically every process is managed by the server, if the server has proxies enabled, so will the build runners.
but this way not work on macos.
Regarding MacOS, have you ever had luck with enabling a global proxy or is this issue only related to Daytona?
@Tpuljak you're right. So daytona does not have to provide proxy.
Regarding MacOS, have you ever had luck with enabling a global proxy or is this issue only related to Daytona?
It should be a problem with docker. I set proxy in docker-desktop and it was normal.
Thanks! please close this issue.
Is your feature request related to a problem? Please describe.
Sometime the network will be a problem cause create workspace faild(or other),such as in china.
Describe the solution you'd like
Support proxy config.
Describe alternatives you've considered
Currently I'm running a global proxy on the server machine, which is not a good way.
Additional context
Or what services can I proxy to that would solve this problem?
In short, it would be more convenient if there is a built-in proxy.