- Jun 6, 2020
- 11,517
- 4,383
Hi,
I'm trying to write a local reverse proxy. What it does is:
- accept traffic on a local port
- send the data back and forth between the local port and a remote port
eg: A synology NAS Cloudstation client only works on port 6690 but I would like to be running my local B4J application that accepts data on my local port 6690 (so the cloudstation can connect to localhost on port 6690) and communicate with the external synology server on port 6691
Below is the code. It just does not seem to work (communication halts very soon). The code currently only works for a single connection but it seems the protocol is only using a single socket (as soon as I can resolve my issue I would make it multi-connection proof of course)
Thanks for any suggestions !!
B4X:
I'm trying to write a local reverse proxy. What it does is:
- accept traffic on a local port
- send the data back and forth between the local port and a remote port
eg: A synology NAS Cloudstation client only works on port 6690 but I would like to be running my local B4J application that accepts data on my local port 6690 (so the cloudstation can connect to localhost on port 6690) and communicate with the external synology server on port 6691
Below is the code. It just does not seem to work (communication halts very soon). The code currently only works for a single connection but it seems the protocol is only using a single socket (as soon as I can resolve my issue I would make it multi-connection proof of course)
Thanks for any suggestions !!
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید