search
HomeSystem TutorialLINUXDetailed introduction and usage of code implementation of forwarding server and proxy server

Detailed introduction and usage of code implementation of forwarding server and proxy server

The code was written after work. The code is divided into forwarding server and proxy server. Let’s talk about the forwarding server first. Although the forwarding server can also be said to be a redirection serverLinux uses a proxy server. For example, the forwarding server eavesdrops on port 80. If A browser user accesses the server IP (the browser requests port 80 by default). After the forwarding server receives the browser user's request, it redirects the browser user's request to other ports on the machine or to other machines on the same public network. Let’s talk about the designated port of the proxy server. First, let me explain that my proxy server can only proxy designated websites or other customers who can proxy, such as the SVN service built on the external network or the intranet that cannot be accessed in some places. website. The proxy server is divided into server and client. The server needs to run on the client and the intranet that everyone can access. The client needs to be placed on the network that can access the customers who need the proxy, or it can be placed on the customer's local machine. superior. Usage: Unzip proxy.tar.gz and enter the proxy directory. Then makelinux uses the proxy server, which will generate three programs we need, transmit (forwarding server), manager (proxy server), client (proxy client) Server-side usage: ./transmit [port] (for example, 80)./manager [port] (specify arbitrarily) Client-side usage: ./client-i[proxy server IP]:[port]-t[customer IP]:[ Port] -d [customer domain name] For example: If my intranet server IP is 1.2.3.4, and the proxy customer is NetEase (NetEase domain name:, IP: 202.108.9.33), the server side runs as follows./transmit80./mananger8000 client side Run ./client-i1.2.3.4:8000-t202.108.9.33-d or ./client-i1.2.3.4:8000-t202.108.9.33:80-d as follows and then change the local hosts file ( windows is c:windowssystem32driversetchostslinux is/etc/hosts) fill in the following line 1.2.3.4 Then type in the browser to access NetEase through the proxy server. In fact, if the customer applies for the domain name by himself, he can directly point his domain name to 1.2.3.4, without changing the local hosts file

代理服务器linux_linux代理服务器软件_linux使用代理服务器

The above is the detailed content of Detailed introduction and usage of code implementation of forwarding server and proxy server. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Top 5 Linux Tools for Monitoring Disk I/O PerformanceTop 5 Linux Tools for Monitoring Disk I/O PerformanceApr 27, 2025 pm 04:45 PM

This guide explores essential Linux tools for monitoring and troubleshooting disk I/O performance, a crucial metric impacting server speed and application responsiveness. Disk I/O performance directly affects how quickly data is read from and written

4 Ways to Find Plugged USB Device Name in Linux4 Ways to Find Plugged USB Device Name in LinuxApr 27, 2025 pm 04:44 PM

For new Linux users, identifying connected devices is crucial, especially USB drives. This guide provides several command-line methods to determine a USB device's name, essential for tasks like formatting. While USB drives often auto-mount (e.g., /

How to Fix 'No Space Left on Device” on Root (/) PartitionHow to Fix 'No Space Left on Device” on Root (/) PartitionApr 27, 2025 pm 04:43 PM

One of the most common problems with Linux systems, especially those with limited disk space, is the exhaustion of root partition (/) space. When this problem occurs, you may encounter the following error: No space left on device Don’t panic! This just means that your root directory (/partition) is full, which is a common problem, especially on systems with limited disk space or servers running 24/7. When this happens, you may encounter the following problems: The package cannot be installed or upgraded. System startup failed. The service cannot be started. Unable to write to logs or temporary files. This article walks you through practical steps to identify problems, clean up space safely, and prevent them from happening again. These instructions are suitable for beginners

Top 16 Notepad   Replacements for Linux in 2025Top 16 Notepad Replacements for Linux in 2025Apr 27, 2025 pm 04:42 PM

This article explores top-notch Notepad alternatives for Linux users. Notepad , while excellent on Windows, lacks a Linux version. This guide offers a diverse range of options to suit various needs and preferences. Top Notepad Alternatives for

How to Create and Run New Service Units in SystemdHow to Create and Run New Service Units in SystemdApr 27, 2025 pm 04:41 PM

Several days ago, I encountered a 32-bit CentOS 8 distribution and decided to test it on an older 32-bit system. Post-boot, I discovered a network connectivity issue; the connection would drop, requiring manual restoration after each reboot. This pr

How to Check for Bad Sectors on a Hard Disk in LinuxHow to Check for Bad Sectors on a Hard Disk in LinuxApr 27, 2025 pm 04:40 PM

Let's clarify what constitutes a bad sector or bad block: it's a portion of a hard drive or flash memory that's become unreadable or unwritable, typically due to physical damage to the disk surface or malfunctioning flash memory transistors. Accumul

How to Force cp Command to Overwrite Files Without PromptHow to Force cp Command to Overwrite Files Without PromptApr 27, 2025 pm 04:39 PM

The cp command, short for "copy," is a fundamental tool in Linux and other Unix-like systems for duplicating files and directories. While efficient for local file transfers, for network-based copies, scp (secure copy) is preferred due to i

Fix 'rm: Cannot Remove File – Device or Resource Busy” ErrorFix 'rm: Cannot Remove File – Device or Resource Busy” ErrorApr 27, 2025 pm 04:38 PM

When using the rm command to delete a file or directory in Linux system, if you encounter the following error: rm: cannot remove 'file-or-directory': Device or resource busy Don't worry, this is a common problem, which means that the file or directory you are trying to delete is currently being used by the system or running process. Cause of error The "Device or Resource Busy" message indicates that the file or directory is in use. To avoid damaging the system or causing data loss, Linux prevents deleting files in use. Common reasons include: Your terminal is currently in the directory you want to delete. The program or process is using the file or directory.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool