First, when an enterprise wants to provide services to Internet users, the Internet IP address should be configured on the application server, and the Internet firewall should also be configured,
However, when there are too many external servers, many Internet IP addresses may be required, and frequent firewall settings are required, which is very troublesome. Second, after the client is distributed
The configuration must be set by default (otherwise it will cause unnecessary trouble to the customer), the client will point to a relatively fixed Server IP address, that is
The ideal status of the client is to connect to the server through a unified portal and call related services. Third, when a server is busy running multiple services at the same time,
Multiple services can be separated and deployed on different servers, but service separation should be transparent to the client, that is, the client should not feel the service
The changes on the tool can work according to the previous logic. Finally, application servers with business logic should also ensure certain security protection, and do not directly
Connect to the Internet. To solve these contradictions, we need to adopt the kbmmw proxy service to meet the above requirements.
Let's first make a simple proxy service.
1. Create a VCL application (you can also use the FM application after delphi xe2. For convenience, use the VCL framework ).
Place related controls. One is servertransport and the other is clienttransport.
Note: The servertransport port is the port to be accessed by the client,
The clienttransport. Port is the port of the previous service.
2. Use the service Wizard of kbmmw to generate a proxyservice.