Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

There are three kinds of people: men, women, and unix.


devel / comp.unix.shell / Access my workplace intranet with a wrapper/mirror website resides on my vps.

SubjectAuthor
* Access my workplace intranet with a wrapper/mirror website resides onhongy...@gmail.com
`* Re: Access my workplace intranet with a wrapper/mirror websiteGrant Taylor
 `* Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com
  `* Re: Access my workplace intranet with a wrapper/mirror websiteGrant Taylor
   `* Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com
    `* Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com
     `* Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com
      `* Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com
       `- Re: Access my workplace intranet with a wrapper/mirror websitehongy...@gmail.com

1
Access my workplace intranet with a wrapper/mirror website resides on my vps.

<160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4572&group=comp.unix.shell#4572

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:622a:11d6:: with SMTP id n22mr51853685qtk.337.1636006402623;
Wed, 03 Nov 2021 23:13:22 -0700 (PDT)
X-Received: by 2002:a05:620a:448e:: with SMTP id x14mr39667565qkp.459.1636006402489;
Wed, 03 Nov 2021 23:13:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Wed, 3 Nov 2021 23:13:22 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=60.249.28.129; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 60.249.28.129
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
Subject: Access my workplace intranet with a wrapper/mirror website resides on
my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Thu, 04 Nov 2021 06:13:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: hongy...@gmail.com - Thu, 4 Nov 2021 06:13 UTC

I've a vps with the my.domain.xyz FQDN. At the meanwhile, a socks5 proxy server runs on VPS and listens on port 1080 which can access the website on my office subnet, say, by starting chrome with the following command:

$ google-chrome --proxy-server="socks5://my.domain.xyz:1080"

Then I can access my workplace intranet, say, the following one:

http://10.10.10.10:2021

This way works but some cumbersome settings are required. I want to access my workplace intranet with a wrapper/mirror website resides on my vps, say, http://my.domain.xyz:21080," rel="nofollow" target="_blank">http://my.domain.xyz:21080, which can access the intranet website via the socks5 proxy server mentioned above. I mean, when I open the URL http://my.domain.xyz:21080 from anywhere outside of the workplace intranet, it will automatically redirected to http://10.10.10.10:2021 via the socks5 proxy server "socks5://my.domain.xyz:1080".

Is there a feasible way to achieve this aim with the help of unix tools/javascript/python?

Regards,
HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4579&group=comp.unix.shell#4579

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
Date: Thu, 4 Nov 2021 10:15:18 -0600
Organization: TNet Consulting
Message-ID: <sm119c$nv7$1@tncsrv09.home.tnetconsulting.net>
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 4 Nov 2021 16:21:00 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="24551"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
Content-Language: en-US
 by: Grant Taylor - Thu, 4 Nov 2021 16:15 UTC

On 11/4/21 12:13 AM, hongy...@gmail.com wrote:
> Is there a feasible way to achieve this aim with the help of unix
> tools/javascript/python?

Yes, there are ways to do this.

I would suggest spend some time thinking about the security implications
of making a website that's inherently not available to the Internet be
available to the Internet via what you're talking about doing.

socat immediately comes to mind.

--
Grant. . . .
unix || die

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4583&group=comp.unix.shell#4583

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:bc1:: with SMTP id s1mr46512093qki.49.1636089689394;
Thu, 04 Nov 2021 22:21:29 -0700 (PDT)
X-Received: by 2002:ad4:4f0a:: with SMTP id fb10mr33653350qvb.40.1636089689251;
Thu, 04 Nov 2021 22:21:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Thu, 4 Nov 2021 22:21:29 -0700 (PDT)
In-Reply-To: <sm119c$nv7$1@tncsrv09.home.tnetconsulting.net>
Injection-Info: google-groups.googlegroups.com; posting-host=143.198.81.105; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 143.198.81.105
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com> <sm119c$nv7$1@tncsrv09.home.tnetconsulting.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 05:21:29 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
 by: hongy...@gmail.com - Fri, 5 Nov 2021 05:21 UTC

On Friday, November 5, 2021 at 12:15:22 AM UTC+8, Grant Taylor wrote:
> On 11/4/21 12:13 AM, hongy...@gmail.com wrote:
> > Is there a feasible way to achieve this aim with the help of unix
> > tools/javascript/python?
> Yes, there are ways to do this.
>
> I would suggest spend some time thinking about the security implications
> of making a website that's inherently not available to the Internet be
> available to the Internet via what you're talking about doing.
>
> socat immediately comes to mind.

Thank you for your hit the nail on the head hints. Googling with the following keywords gives me much wonderful examples:

socat http server

Say, the following ones:

https://unix.stackexchange.com/questions/448837/create-https-server-with-socat
https://ixday.github.io/post/simple_https/
https://stackoverflow.com/questions/29739901/socat-fake-http-server-use-a-file-as-server-response
https://gist.github.com/baleyko/003a089deb4f532552ef674e9ff4cea9
HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4584&group=comp.unix.shell#4584

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.unix.shell
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
Date: Thu, 4 Nov 2021 23:51:51 -0600
Organization: TNet Consulting
Message-ID: <sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net>
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net>
<3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 5 Nov 2021 05:57:34 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="18121"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
Content-Language: en-US
 by: Grant Taylor - Fri, 5 Nov 2021 05:51 UTC

On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> Thank you ...

You're welcome.

#hazFun #beSafe #playNiceWithOthers

--
Grant. . . .
unix || die

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4585&group=comp.unix.shell#4585

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:7d8e:: with SMTP id c14mr47766468qtd.209.1636096743743;
Fri, 05 Nov 2021 00:19:03 -0700 (PDT)
X-Received: by 2002:a37:2c86:: with SMTP id s128mr43492844qkh.516.1636096743551;
Fri, 05 Nov 2021 00:19:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 5 Nov 2021 00:19:03 -0700 (PDT)
In-Reply-To: <sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.37; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.37
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net> <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 07:19:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 108
 by: hongy...@gmail.com - Fri, 5 Nov 2021 07:19 UTC

On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> > Thank you ...
>
> You're welcome.

The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:

$ sudo apt build-dep socat
$ sudo apt install yodl
$ autoreconf -vfi
$ ./configure
$ make -j44
$ sudo make install

Then I test the problem discussed here with the following command from my VPS:

$ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001

Additional note above the above command:

127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website: 10.8.10.220:2021

Then I try to open http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:

$ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
2021/11/05 15:00:30 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60354 on AF=2 127.0.0.1:8888
2021/11/05 15:00:38 socat[1303141] N forked off child process 1313292
2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:38 socat[1313292] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:38 socat[1313292] N exit(1)
2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60372 on AF=2 127.0.0.1:8888
2021/11/05 15:00:38 socat[1303141] N forked off child process 1313455
2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:38 socat[1313455] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:38 socat[1313455] N exit(1)
2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60486 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314891
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314891] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314891] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60488 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314906
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314906] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314906] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60490 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314907
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314907] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314907] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60492 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314910
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314910] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314910] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60494 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314913
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314913] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314913] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60496 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314914
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314914] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314914] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60498 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314918
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314918] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314918] N exit(1)
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60500 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314919
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314919] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314919] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60502 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314922
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314922] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314922] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60504 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314923
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314923] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314923] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60506 on AF=2 127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314926
2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
2021/11/05 15:00:39 socat[1314926] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314926] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17

[1] https://github.com/runsisi/socat

HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4586&group=comp.unix.shell#4586

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ad4:56a4:: with SMTP id bd4mr41925620qvb.16.1636100351801;
Fri, 05 Nov 2021 01:19:11 -0700 (PDT)
X-Received: by 2002:a05:6214:1c41:: with SMTP id if1mr19182846qvb.0.1636100351666;
Fri, 05 Nov 2021 01:19:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 5 Nov 2021 01:19:11 -0700 (PDT)
In-Reply-To: <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.22.52.161; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 165.22.52.161
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net> <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net> <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 08:19:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 119
 by: hongy...@gmail.com - Fri, 5 Nov 2021 08:19 UTC

On Friday, November 5, 2021 at 3:19:06 PM UTC+8, hongy...@gmail.com wrote:
> On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> > On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> > > Thank you ...
> >
> > You're welcome.
> The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:
>
> $ sudo apt build-dep socat
> $ sudo apt install yodl
> $ autoreconf -vfi
> $ ./configure
> $ make -j44
> $ sudo make install
>
> Then I test the problem discussed here with the following command from my VPS:
>
> $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
>
> Additional note above the above command:
>
> 127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website: 10.8.10.220:2021
>
> Then I try to open http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:
>
> $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001

But the following testing with a HTTP proxy running on port 6002 works as expected:

$ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr PROXY:127.0.0.1:10.8.10.220:2021,proxyport=6002

Another notes: It seems the TCP4-LISTEN must be used as follows in this question:

TCP4-LISTEN:2021

I mean, socat must listen on the same port locally as the remote intranet website.

> 2021/11/05 15:00:30 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60354 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:38 socat[1303141] N forked off child process 1313292
> 2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:38 socat[1313292] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:38 socat[1313292] N exit(1)
> 2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60372 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:38 socat[1303141] N forked off child process 1313455
> 2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:38 socat[1313455] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:38 socat[1313455] N exit(1)
> 2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60486 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314891
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314891] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314891] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60488 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314906
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314906] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314906] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60490 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314907
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314907] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314907] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60492 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314910
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314910] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314910] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60494 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314913
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314913] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314913] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60496 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314914
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314914] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314914] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60498 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314918
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314918] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314918] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60500 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314919
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314919] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314919] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60502 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314922
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314922] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314922] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60504 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314923
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314923] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314923] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60506 on AF=2 127.0.0.1:8888
> 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314926
> 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> 2021/11/05 15:00:39 socat[1314926] E parseopts(): option "socksport" not supported with this address type
> 2021/11/05 15:00:39 socat[1314926] N exit(1)
> 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
>
> [1] https://github.com/runsisi/socat
>
> HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<2c5c8b0b-7e46-4900-9145-0b0716f7aa81n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4587&group=comp.unix.shell#4587

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:1207:: with SMTP id u7mr45389468qkj.189.1636100963097;
Fri, 05 Nov 2021 01:29:23 -0700 (PDT)
X-Received: by 2002:a05:622a:1208:: with SMTP id y8mr50659768qtx.214.1636100962960;
Fri, 05 Nov 2021 01:29:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 5 Nov 2021 01:29:22 -0700 (PDT)
In-Reply-To: <552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=60.249.28.131; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 60.249.28.131
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net> <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net> <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
<552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2c5c8b0b-7e46-4900-9145-0b0716f7aa81n@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 08:29:23 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 127
 by: hongy...@gmail.com - Fri, 5 Nov 2021 08:29 UTC

On Friday, November 5, 2021 at 4:19:14 PM UTC+8, hongy...@gmail.com wrote:
> On Friday, November 5, 2021 at 3:19:06 PM UTC+8, hongy...@gmail.com wrote:
> > On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> > > On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> > > > Thank you ...
> > >
> > > You're welcome.
> > The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:
> >
> > $ sudo apt build-dep socat
> > $ sudo apt install yodl
> > $ autoreconf -vfi
> > $ ./configure
> > $ make -j44
> > $ sudo make install
> >
> > Then I test the problem discussed here with the following command from my VPS:
> >
> > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> >
> > Additional note above the above command:
> >
> > 127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website: 10.8.10.220:2021
> >
> > Then I try to open http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:
> >
> > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> But the following testing with a HTTP proxy running on port 6002 works as expected:
>
> $ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr PROXY:127.0.0.1:10.8.10.220:2021,proxyport=6002

And the following testing with the socks5 proxy running on port 6001 works as expected:

$ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socks5port=6001

And the socat version with socks5 support [1] must be used in the above testing.

[1] https://github.com/runsisi/socat


> Another notes: It seems the TCP4-LISTEN must be used as follows in this question:
>
> TCP4-LISTEN:2021
>
> I mean, socat must listen on the same port locally as the remote intranet website.
> > 2021/11/05 15:00:30 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60354 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:38 socat[1303141] N forked off child process 1313292
> > 2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:38 socat[1313292] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:38 socat[1313292] N exit(1)
> > 2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2 127.0.0.1:60372 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:38 socat[1303141] N forked off child process 1313455
> > 2021/11/05 15:00:38 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:38 socat[1313455] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:38 socat[1313455] N exit(1)
> > 2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60486 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314891
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314891] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314891] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60488 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314906
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314906] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314906] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60490 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314907
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314907] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314907] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60492 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314910
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314910] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314910] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60494 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314913
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314913] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314913] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60496 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314914
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314914] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314914] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60498 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314918
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314918] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314918] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60500 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314919
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314919] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314919] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60502 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314922
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314922] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314922] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60504 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314923
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314923] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314923] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> > 2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2 127.0.0.1:60506 on AF=2 127.0.0.1:8888
> > 2021/11/05 15:00:39 socat[1303141] N forked off child process 1314926
> > 2021/11/05 15:00:39 socat[1303141] N listening on AF=2 0.0.0.0:8888
> > 2021/11/05 15:00:39 socat[1314926] E parseopts(): option "socksport" not supported with this address type
> > 2021/11/05 15:00:39 socat[1314926] N exit(1)
> > 2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
> >
> > [1] https://github.com/runsisi/socat
> >
> > HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<18252f9a-81ac-4f6a-8b6b-279d4def881an@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4588&group=comp.unix.shell#4588

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:44c2:: with SMTP id y2mr46285133qkp.351.1636109935842;
Fri, 05 Nov 2021 03:58:55 -0700 (PDT)
X-Received: by 2002:a05:6214:1c41:: with SMTP id if1mr19865457qvb.0.1636109935651;
Fri, 05 Nov 2021 03:58:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 5 Nov 2021 03:58:55 -0700 (PDT)
In-Reply-To: <2c5c8b0b-7e46-4900-9145-0b0716f7aa81n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.22.49.121; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 165.22.49.121
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net> <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net> <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
<552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com> <2c5c8b0b-7e46-4900-9145-0b0716f7aa81n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <18252f9a-81ac-4f6a-8b6b-279d4def881an@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 10:58:55 +0000
Content-Type: text/plain; charset="UTF-8"
 by: hongy...@gmail.com - Fri, 5 Nov 2021 10:58 UTC

On Friday, November 5, 2021 at 4:29:25 PM UTC+8, hongy...@gmail.com wrote:
> On Friday, November 5, 2021 at 4:19:14 PM UTC+8, hongy...@gmail.com wrote:
> > On Friday, November 5, 2021 at 3:19:06 PM UTC+8, hongy...@gmail.com wrote:
> > > On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> > > > On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> > > > > Thank you ...
> > > >
> > > > You're welcome.
> > > The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:
> > >
> > > $ sudo apt build-dep socat
> > > $ sudo apt install yodl
> > > $ autoreconf -vfi
> > > $ ./configure
> > > $ make -j44
> > > $ sudo make install
> > >
> > > Then I test the problem discussed here with the following command from my VPS:
> > >
> > > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> > >
> > > Additional note above the above command:
> > >
> > > 127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website: 10.8.10.220:2021
> > >
> > > Then I try to open http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:
> > >
> > > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> > But the following testing with a HTTP proxy running on port 6002 works as expected:
> >
> > $ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr PROXY:127.0.0.1:10.8.10.220:2021,proxyport=6002
> And the following testing with the socks5 proxy running on port 6001 works as expected:
>
> $ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socks5port=6001
>
> And the socat version with socks5 support [1] must be used in the above testing.

But I still failed to use SSL/TLS protocol with socat, say, by the follow command:

$ socat -v -d -d tcp-listen:2021,fork,reuseaddr socks5:127.0.0.1:www.google.com:443,socks5port=18888

Then open the following URL in Firefox can't let me access google:

http://localhost:2021/

But use the above socks5 proxy directly in Firefox works.

HZ

Re: Access my workplace intranet with a wrapper/mirror website resides on my vps.

<a0f9f938-d0f5-418b-9520-1f8169fa5daan@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=4589&group=comp.unix.shell#4589

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a37:44cc:: with SMTP id r195mr47184940qka.77.1636110158066;
Fri, 05 Nov 2021 04:02:38 -0700 (PDT)
X-Received: by 2002:a05:622a:190b:: with SMTP id w11mr1797404qtc.311.1636110157930;
Fri, 05 Nov 2021 04:02:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 5 Nov 2021 04:02:37 -0700 (PDT)
In-Reply-To: <18252f9a-81ac-4f6a-8b6b-279d4def881an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.22.49.196; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 165.22.49.196
References: <160baf2c-d14f-4577-9cea-bc2c8068ccfcn@googlegroups.com>
<sm119c$nv7$1@tncsrv09.home.tnetconsulting.net> <3345f093-052a-4764-87d2-8bdb437ec573n@googlegroups.com>
<sm2h4e$hm9$1@tncsrv09.home.tnetconsulting.net> <264f451d-9846-4e0d-8fef-cd5c2beeafc9n@googlegroups.com>
<552bb4fd-1b7c-438f-ab7f-a71dcf747f89n@googlegroups.com> <2c5c8b0b-7e46-4900-9145-0b0716f7aa81n@googlegroups.com>
<18252f9a-81ac-4f6a-8b6b-279d4def881an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a0f9f938-d0f5-418b-9520-1f8169fa5daan@googlegroups.com>
Subject: Re: Access my workplace intranet with a wrapper/mirror website
resides on my vps.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Fri, 05 Nov 2021 11:02:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 75
 by: hongy...@gmail.com - Fri, 5 Nov 2021 11:02 UTC

On Friday, November 5, 2021 at 6:58:58 PM UTC+8, hongy...@gmail.com wrote:
> On Friday, November 5, 2021 at 4:29:25 PM UTC+8, hongy...@gmail.com wrote:
> > On Friday, November 5, 2021 at 4:19:14 PM UTC+8, hongy...@gmail.com wrote:
> > > On Friday, November 5, 2021 at 3:19:06 PM UTC+8, hongy...@gmail.com wrote:
> > > > On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> > > > > On 11/4/21 11:21 PM, hongy...@gmail.com wrote:
> > > > > > Thank you ...
> > > > >
> > > > > You're welcome.
> > > > The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:
> > > >
> > > > $ sudo apt build-dep socat
> > > > $ sudo apt install yodl
> > > > $ autoreconf -vfi
> > > > $ ./configure
> > > > $ make -j44
> > > > $ sudo make install
> > > >
> > > > Then I test the problem discussed here with the following command from my VPS:
> > > >
> > > > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> > > >
> > > > Additional note above the above command:
> > > >
> > > > 127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website: 10.8.10.220:2021
> > > >
> > > > Then I try to open http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:
> > > >
> > > > $ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
> > > But the following testing with a HTTP proxy running on port 6002 works as expected:
> > >
> > > $ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr PROXY:127.0.0.1:10.8..10.220:2021,proxyport=6002
> > And the following testing with the socks5 proxy running on port 6001 works as expected:
> >
> > $ socat -v -d -d TCP4-LISTEN:2021,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socks5port=6001
> >
> > And the socat version with socks5 support [1] must be used in the above testing.
> But I still failed to use SSL/TLS protocol with socat, say, by the follow command:
>
> $ socat -v -d -d tcp-listen:2021,fork,reuseaddr socks5:127.0.0.1:www.google.com:443,socks5port=18888
>
> Then open the following URL in Firefox can't let me access google:
>
> http://localhost:2021/

I also tried with the following URL:

https://localhost:2021/
But meet the following error:

404. That’s an error.

The requested URL / was not found on this server. That’s all we know.

> But use the above socks5 proxy directly in Firefox works.
>
> HZ

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor