Jump to content
  • 0
Greg.Buerk

Redirecting Chrome

Question

To use Chrome as a redirtector you need to modify or copy the HTTP redirector. So once you copy the redirector just change the Program to run and arguments.

 

Program to run:

FULLPATHTOFILE\Chrome.exe

 

Arguments

--proxy-server="socks5://%localip1%:%localport1%"

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

found the problem. it was because i already had an open session. found this online:

 

i found a "fix" for the caveat that segfault mentioned where the proxy won't work if there is a current chrome process running. it turns out that unlike most browsers, chrome doesn't have command line switch to force launches to occur in a new process. however, there is a way to trick it into doing so. i used this: C:\Users\Kudamungy\AppData\Local\Google\Chrome\Application\chrome.exe -proxy-server=127.0.0.1:8118 -incognito -user-data-dir=C:\foo check.torproject.org the -user-data-dir switch make is open as a new process. the directory "foo" doesn't have to exist, but after opening your shortcut it will be created.

 

i used:

 

--proxy-server="socks5://%localip1%:%localport1%" -incognito -user-data-dir=C:\chrometest

Share this post


Link to post
Share on other sites
  • 0

yes, working. cannot open sonicwall admin pages on the clients, but seems like every other pages like NAS devices, printers, web apps, etc seem to work great. No javascript or script errors like the LT Browser in HTTP Connect gets either...

 

it's setup exactly as you mentioned with the modified arguments, pretty much the HTTP Connect one but chrome instead.

 

name: Chrome HTTP Connect

Program: C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe

arguments: --proxy-server="socks5://%localip1%:%localport1%" --incognito --user-data-dir=C:\LTchrome

Redirector Type: Computer

Redirector type: local port - 0, local ip - 127.0.0.1, remote port - 0, type - tcp socks proxy

Share this post


Link to post
Share on other sites
  • 0

Greg,

 

First of all, thanks for your information.

 

Quick Question: Suppose, I am creating a new redirector without program and argument, I have started it as well. Now, Is that possible to access the remote agent web page from chrome? Redirector will not run the chrome.exe, I want to open the chrome manually.

Share this post


Link to post
Share on other sites
  • 0

If you create a SOCKS proxy redirector with out a program to run. The Sock will be up and running. YOu now can launch chrome, IE, LTBrowser, etc with Socks proxy settings and BAM it will work.

 

Just launch chrome with the socks switches and the Local Port and IP of the redirector. CTRL Click on the tunnel to see the ports in use

Share this post


Link to post
Share on other sites
  • 0

Got this setup with no problems. This works pretty well for managing specific network devices like BDR's, SAN's, and Switches that require Chrome.

 

Thanks for sharing.

 

jeff

Share this post


Link to post
Share on other sites
  • 0

Hoping someone is still watching this post.

 

I am able to get the redirector to connect successfully, but I get port 80 on the other end of the tunnel instead of the target.

 

Any ideas ?

Share this post


Link to post
Share on other sites
  • 0

Not sure what I have done wrong, everything seems to be setup as above.

It loads up Chrome but nothing works. I am assuming I have some remote port incorrect.

But most of this is beyond me! But hoping someone can point me in right direction.

 

STUN Server: Stun.Labtechsoftware.com

STUN Port: 70

Remote Host: 127.0.0.1

Remote Port: 50280

UDP Local Port: 40090

TCP Local Port: 0

Tunnel MTU: 1450

Tunnel UPNP: True

Tunnel Encryption: AES 128 bit

Tunnel Threading: True

Tunnel Timeout: 120

Tunnel Version: 2.3.1.136

TCP Remote Host: labtech.wcswa.com.au

Using TCP Relay Connection through the LabTech Server

 

Redirector: Chrome HTTP Connect&127.0.0.1

LocalIP1: 127.0.0.1

LocalPort1: 49326

RemoteIP1: tcp socks proxy

RemotePort1: 0

Bytes Uploaded: 0

Bytes Downloaded: 0

Active: True

PID: 20212 chrome

Share this post


Link to post
Share on other sites
  • 0

Make sure your running Chrome using socks 5 with this proxy 127.0.0.1:49326 as the example above.

 

 

You can test the socks proxy out by running it, the ctrl click and see the ip and port. Then in any Browser IE,firefox or Chrome configure it to use a socks proxy and specify the ip and port above. Now go to www.whatismyip.com and see the IP is NOT your external site and see that the bytes in the tunnel button have changed, if its still 0 then you do not have the browser configured correctly.

Share this post


Link to post
Share on other sites
  • 0

It does not seem Firefox supports proxy settings from the CMD. They do support calling a profile which can have proxy settings set, however I have not been able to get it to honor the Socks Proxy settings.

Share this post


Link to post
Share on other sites
  • 0

This is working for us too. If you're running the LT client as a RemoteApp (or via Citrix), you must also include the argument --allow-no-sandbox-job - otherwise, Chrome launches, but won't do anything.

Share this post


Link to post
Share on other sites
  • 0

SQL query will make the necessary entries to the `redirectors` and `redirectorports` tables for Chrome HTTP Connector. Included is one modification. Instead of C:\LTchrome for Chrome temp files, it's now C:\ProgramData\LabTech Client\LTChrome\ folder. It's a little cleaner, but more importantly it allows the redirector to work if LTClient.exe / Chrome.exe doesn't have write access to C:\ directory. Ran into this problem on my Server 2012 system.

 

INSERT INTO `labtech`.`redirectors` (`Name`, `Program`, `ProgramArgs`, `RunBefore`, `RunAfter`, `UseProbe`, `Group`, `ClientRunBefore`, `ClientRunAfter`, `Console`, `Computer`, `Device`, `Probe`, `Mac`, `Unix`, `Mobile`, `Basic`) VALUES('Chrome HTTP Connect','C:\\Program Files (x86)\\Google\\Chrome\\Application\\Chrome.exe','--proxy-server=\"socks5://%localip1%:%localport1%\" --incognito --user-data-dir=\"%ALLUSERSPROFILE%\\LabTech Client\\LTChrome\"','','','0','Proxies','','','0','1','0','0','0','0','0','0');
INSERT INTO `redirectorports` (`RedirectorID`, `LocalPort`, `LocalIP`, `RemotePort`, `RemoteIP`, `SocketType`) VALUES((SELECT `redirectorid` FROM `labtech`.`redirectors` ORDER BY `redirectorid` DESC LIMIT 1),'0','127.0.0.1','0','','4');

Share this post


Link to post
Share on other sites
  • 0

I love the idea of this so I attempted to implement this redirector but ran into a few snags. The default Chrome installation path varies between two primary locations (app data and program files x86 on 64 bit systems). I created a batch file that attempts to silently call both locations and launch Chrome with the proxy info passed from Labtech. Also, once the redirector launches the browser, I made it default to a Google search for the term 'IP' which will show you the current public IP of the client you are proxied through.

 

I've had varied success with this and if anyone has any input to improve stability I'd love to hear it. Often times it may report as not being able to connect to the proxy server. However when it works, it's much better than IE so it's worth it to me. Place the attached batch file (will have to rename from .txt) in your C:\Program Files (x86)\Labtech Client\ folder (can be automated to all of your consultants by creating a search and a simple script) and create the following redirector:

 

Name: Chrome HTTP Connect

Program: %startpath%\LTChrome.bat

Arguments: %LocalIP1% %LocalPort1%

Redirector Type: Computer

Local Port: 0

Local IP: 127.0.0.1

Remote Port: 0

Remote IP: [blank]

Type: TCP Socks Proxy

LTChrome.bat.txt

Share this post


Link to post
Share on other sites
  • 0

I am struggling to get Chrome to load the local address and port information into the Omnibar when activating the redirector using the steps provided.

 

I also attempted the "LTChrome.bat" method.

 

Chrome launches per the arguments provided by both methods, but the address comes up as follows:

https://google.com/#q=ip

 

with a splash page: UNABLE TO CONNECT TO PROXY SERVER.

 

Any advice is much appreciated.

Share this post


Link to post
Share on other sites
  • 0

NSB, are you sure you set your redirector type to 'TCP Socks Proxy'? It should show as Socket Type 4 when entered correctly into the Redirected Apps section of the dashboard.

Share this post


Link to post
Share on other sites
  • 0

Thanks for your response.

 

Here are the settings

 

Program:

C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe

Arguments:

--proxy-server="socks5://%localip1%:%localport1%" --incognito --user-data-dir=C:\LTchrome --allow-no-sandbox-job

 

Redirector Type: DEVICE, COMPUTER

REDIRECTED PORTS

Local port:

0

Local IP:

127.0.0.1

Remote Port:

0

Remote IP:

none

Socket Type:

4

Type:

TCP Socks Proxy

 

Here is the URL result when I attempt to use the reidrector:

With a Web Page: Unable to connect to Web Page

 

Thanks for any insight.

Share this post


Link to post
Share on other sites
  • 0

I dont know if anyone is interested in this but I just set it up so that it automatically connects to the IP of the device your right clicking on, so you dont need to manually put in the IP of the printer or router that your trying to connect to after you launch the redirector.

 

Here is my settings:

name: Chrome HTTP Connect
Program: C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe
arguments: --proxy-server="socks5://%localip1%:%localport1%" %RemoteIP% -incognito -user-data-dir=C:\chrometest
Redirector Type: Computer
Redirector type: local port - 0, local ip - 127.0.0.1, remote port - 0, type - tcp socks proxy

 

Its virtually the same thing as philip's solution, but I added the %RemoteIP% in there so it would automatically connect to it. you should also be able to add a https://%RemoteIP% instead of just %RemoteIP% if you want to make a https redirector.

 

Note** this is for a "device" not a "computer"

 

A computer I would just keep Philip's settings.

Share this post


Link to post
Share on other sites
  • 0

anyone had issues getting pages to load once you actually get chrome to open? my redirector launches fine and i can browse to sites but if I try to login to a firewall or a NAS or something most of them don't load properly. In a sonicwall firewalls case I can get to the login screen and login but most of the elements on the page never load

Share this post


Link to post
Share on other sites
  • 0

Yes, I normally have the exact same issue with sonicwalls. Haven't had luck figuring it out.

 

Sent from my SAMSUNG-SGH-I747 using Tapatalk

Share this post


Link to post
Share on other sites
  • 0

I knew I should have looked here first.

I couldn't figure out why Chrome wasn't working when I was copying the default HTTP redirector exactly, it needed the proxy setting in the arguments.

 

I uninstalled the full Chrome product, downloaded and "installed" the Chrome portable app to a folder on my C: and pointed the redirector to that. Once I got that working I tried copied the portable app to a network drive and that failed miserably. After reinstalling Chrome, it's in AppData, not program files so I won't be changing it back, I'll keep the portable app. No question, just an observation.

 

Thanks Greg & all.

 

-Joel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×