Skip to content
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

Meshagent over http proxy in linux #213

Open
dammaer opened this issue Nov 2, 2023 · 3 comments
Open

Meshagent over http proxy in linux #213

dammaer opened this issue Nov 2, 2023 · 3 comments

Comments

@dammaer
Copy link

dammaer commented Nov 2, 2023

Hello! Thank you for meshcentral. This is a super convenient device management tool.

I have a problem connecting an agent on a remote machine to a meshcentral server via http proxy. Debian 12 is installed on the machine. There are no problems with a direct connection and the agent successfully connects to the server. If I transfer this computer behind a proxy server, the agent does not connect.
On the agent side, I edit the meshagent.msh file and add the WebProxy=http://10.0.68.52:3128/ option. I tried different options with and without http://. With and without quotes. The agent still does not connect to the server.

I tried removing the WebProxy option and passing environment variables to meshagent.service:

[Service]
Environment="http_proxy=http://10.0.68.52:3128/"
Environment="https_proxy=http://10.0.68.52:3128/"
Environment="HTTP_PROXY=http://10.0.68.52:3128/"
Environment="HTTPS_PROXY=http://10.0.68.52:3128/"

This didn't give me any results.

Here is the agent log:

[2023-11-02 02:13:06 PM] [434BF98C5D4F394C] microstack/ILibParsers.c:10978 (0,0) PLATFORM_TYPE: 1
[2023-11-02 02:13:06 PM] [434BF98C5D4F394C] microstack/ILibParsers.c:10978 (0,0) Running as Service: 1
[2023-11-02 02:13:06 PM] [434BF98C5D4F394C] meshcore/agentcore.c:4296 (0,0) Attempting to connect to Server...
[2023-11-02 02:13:06 PM] [434BF98C5D4F394C] meshcore/agentcore.c:4299 (0,0) Attempting to connect to Server...
[2023-11-02 02:13:06 PM] [434BF98C5D4F394C] microstack/ILibParsers.c:10978 (0,0) Connecting to: wss://myserver:5580/agent.ashx
[2023-11-02 02:13:26 PM] [434BF98C5D4F394C] microstack/ILibParsers.c:10978 (0,0) Network Timeout Occurred...
[2023-11-02 02:13:26 PM] [434BF98C5D4F394C] microstack/ILibParsers.c:10978 (0,0) Control Channel Disconnected [13]...
[2023-11-02 02:13:26 PM] [434BF98C5D4F394C] meshcore/agentcore.c:3726 (0,0) Connection Error [0x25ead58, 0, [13]]...

Tell me how to still force the agent to use a proxy server?

@si458
Copy link
Collaborator

si458 commented Nov 16, 2023

have you tried this method of a text file? Ylianst/MeshCentral#321 (comment)

@dammaer
Copy link
Author

dammaer commented Nov 16, 2023

have you tried this method of a text file? Ylianst/MeshCentral#321 (comment)

Thank you for trying to help!
I created a meshagent.proxy file and specified the proxy address 10.0.68.52:3128 in it. Restarted the agent. But the agent still doesn't connect. Other utilities such as wget, curl, apt work properly through this proxy. In Windows there is no such problem with the agent. I check the auto proxy box and the agent connects properly. The problem is only in Linux.

@pvssrikanth
Copy link

Hi Team,
I have installed meshcentral server using docker image and server is running fine on my.domain.com

I have downloaded agent and installed on windows machine
image

after running agent , it shows its running fine in vm-group-a

But on server in this group it is NOT showing

kindly guide how i can fix this issue

I have added hosts file in windows and route ping all is working fine w.r.t connectivity.

Some one please help what is the issue here in configuration

thanks
srikanth

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

No branches or pull requests

3 participants