CN107948232A - Implementation method, data transmission method, apparatus and system are acted on behalf of based on Hook API - Google Patents

Implementation method, data transmission method, apparatus and system are acted on behalf of based on Hook API Download PDF

Info

Publication number
CN107948232A
CN107948232A CN201610896058.8A CN201610896058A CN107948232A CN 107948232 A CN107948232 A CN 107948232A CN 201610896058 A CN201610896058 A CN 201610896058A CN 107948232 A CN107948232 A CN 107948232A
Authority
CN
China
Prior art keywords
equipment
agent
api
address
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610896058.8A
Other languages
Chinese (zh)
Other versions
CN107948232B (en
Inventor
曾岳锋
张元龙
左鸿绪
郭计伟
陈焕葵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610896058.8A priority Critical patent/CN107948232B/en
Publication of CN107948232A publication Critical patent/CN107948232A/en
Application granted granted Critical
Publication of CN107948232B publication Critical patent/CN107948232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The invention discloses a kind of implementation method of acting on behalf of based on Hook API, including the first equipment send the second equipment purpose IP address and port numbers to API library, to call the function in API library;According to API library, the agency service port of the first equipment and agent equipment is established and is connected;API library sends the purpose IP address of the second equipment of reception and port numbers to agent equipment;And agent equipment is established using the purpose IP address and port numbers of agency service port and the second equipment and connected.The present invention also provides a kind of data transmission method, apparatus and system, the present invention acts on behalf of implementation method, data transmission method, apparatus and system based on Hook API, by way of Hook API, and ensured by agreement by the data transfer between the API of Hook and the agency service port of agent equipment, so that agent equipment is transparent for the both sides of alternating transmission data, and need not know to transmit the agreement between both ends, easily extend and agent process can be simplified, improve performance, O&M conveniently.

Description

Implementation method, data transmission method, apparatus and system are acted on behalf of based on Hook API
Technical field
The present invention relates to a kind of field of computer technology, more particularly to it is a kind of based on Hook API act on behalf of implementation method, Data transmission method, apparatus and system.
Background technology
In a big network cluster, since the limitation of security strategy, data can not be directly two between distinct device Mutually transmit, and needed by an intermediate equipment between person, can be become from the first equipment to the data transfer mode of the second equipment Into:First equipment transfers data to intermediate equipment, intermediate equipment again data transfer to the second equipment, wherein, intermediate equipment Play the role of agency.
Common to act on behalf of that implementation is main two kinds, one kind is that data have been transferred to agent equipment from the first equipment, Agent equipment needs first to parse data, what service is the data transmitted by parsing data correspond to, then by the data It is transferred to corresponding service processes in the second equipment.The implementation needs agent equipment for knowing that the first equipment is set with second The agreement of the data of interaction between standby, agent equipment parsing data, which need to expend CPU, to be calculated, and manages diversified agreement also ten Point complexity, in addition cumbersome can match somebody with somebody in the process of dilatation deployment, it is necessary to change with the first equipment and second are device-dependent Put.
Another kind is that agent equipment allocates multiple ports in advance, and the data of different agreement are first sent to agency and set by the first equipment Standby different port, agent equipment is again by the different backstages of this different port request data forwarding to the second equipment.This side It is corresponding with service that the major drawbacks of method are that port is needed, and it is opaque, it is necessary to by port to act on behalf of in this system in design It is mapped with service, O&M is inconvenient.
The content of the invention
In view of this, the present invention provide it is a kind of based on Hook API act on behalf of implementation method, data transmission method, device and System, easily extends and can simplify agent process, improves performance, O&M is also convenient for.
An embodiment of the present invention provides the implementation method of acting on behalf of of Hook API a kind of, including the first equipment to send the second equipment Purpose IP address and port numbers to the API library, to call the function in API library;According to the API library, by the first equipment Establish and connect with the agency service port of agent equipment;The API library by the purpose IP address of second equipment of reception and Port numbers are sent to the agent equipment;And the agent equipment utilizes agency service port and the purpose of second equipment IP address and port numbers establish connection.
The embodiment of the present invention additionally provides a kind of data transmission method, and the agency the described method includes above-mentioned Hook API is real The agency service port of existing method and the agent equipment receives the data that first equipment is sent, and forwards the data on To the purpose IP address and port numbers of second equipment.
The embodiment of the present invention additionally provide it is a kind of implementation method is acted on behalf of based on Hook API, applied to API library, including connect Receive the purpose IP address and port numbers for the second equipment that first equipment is sent;And make the generation of the first equipment and agent equipment Manage serve port and establish connection, and the purpose IP address of second equipment and port numbers are sent to the agent equipment, with So that the purpose IP address and port numbers of the agency service port of the agent equipment and second equipment are established and connected.
The embodiment of the present invention additionally provides a kind of agency based on Hook API and realizes system, described based on Hook API's Agency realizes that system includes the first equipment, API library, agent equipment and the second equipment;First equipment sends the second equipment Purpose IP address and port numbers to the API library, to call the function in API library;The API library be used for make the first equipment with Connection is established in the agency service port of agent equipment, and the purpose IP address of second equipment of reception and port numbers are sent To the agent equipment;The agent equipment is used to utilize purpose IP address of the agency service port with second equipment and end Slogan establishes connection.
The embodiment of the present invention additionally provide it is a kind of realization device is acted on behalf of based on Hook API, applied to API library, the base Include receiving module in the realization device of acting on behalf of of Hook API, the destination IP of the second equipment sent for receiving the first equipment Location and port numbers;Connection is established in link block, the agency service port for making first equipment and agent equipment;And hair Module is sent, for sending the purpose IP address of second equipment and port numbers to the agent equipment, so that the generation Manage the agency service port of equipment and establish connection with the purpose IP address of second equipment and port numbers.
It is provided in an embodiment of the present invention that implementation method, data transmission method, apparatus and system are acted on behalf of based on Hook API, By way of Hook API so that agent equipment is for the first equipment and the second device transparency, and alternating transmission data Both sides be not aware that the presence of agent equipment, this makes the dilatation of agent equipment and disposes very convenient.In addition, by acting on behalf of Equipment sets agency service, and passes through association by the data transfer between the API of Hook and the agency service port of agent equipment Discuss the mode ensured so that the destination interface of opposite equip., and nothing can be transferred to exactly by being transferred to the data of agent equipment It need to know to transmit the agreement between both ends, simple agent design, performance can also greatly improve, and O&M is also convenient for.
Above and other objects, features and advantages to allow the present invention can become apparent, preferred embodiment cited below particularly, And coordinate institute's accompanying drawings, it is described in detail below.
Brief description of the drawings
Fig. 1 acts on behalf of implementation method, data transmission method, device for what one embodiment of the invention provided based on Hook API And systematic difference environment map;
Fig. 2 shows a kind of structure diagram of server;
Fig. 3 is the flow chart for acting on behalf of implementation method based on Hook API that first embodiment of the invention provides;
Fig. 4 is the flow chart for acting on behalf of implementation method based on Hook API that second embodiment of the invention provides;
Fig. 5 is the flow chart for acting on behalf of implementation method based on Hook API that third embodiment of the invention provides;
Fig. 6 is the structure chart that the agency based on Hook API that fourth embodiment of the invention provides realizes system;
Fig. 7 is the structure chart for acting on behalf of realization device based on Hook API that fifth embodiment of the invention provides.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment, belongs to the scope of protection of the invention.
What various embodiments of the present invention were provided acts on behalf of implementation method, apparatus and system based on Hook API, can be applied to In application environment as shown in Figure 1, the data transfer of striding equipment is realized.As shown in Figure 1, the first equipment 100, API library 200, generation Reason 300 and second equipment 400 of equipment is located in wireless network or cable network, by the wireless network or cable network, the One equipment 100, API library 200,300 and second equipment 400 of agent equipment carry out data interaction.
Wherein, for the first equipment 100 as the second equipment 400, the two may each comprise server, can also include PC machine The terminal such as (Personal Computer, personal computer), all-in-one machine, pocket computer on knee, car-mounted terminal is set It is standby, and smart mobile phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) mobile terminal device such as player.
Wherein, API library 200 is remotely located, and it is local can also to be located at the first equipment 100.
Preferably, for API library 200 positioned at distal end, it carries out data by network and the first equipment 100 and agent equipment 300 Interaction.
Fig. 2 shows a kind of structure diagram of server.Structure shown in Fig. 2 can be suitable for the first equipment 100, generation at the same time 300 and second equipment 400 of equipment is managed, as shown in Fig. 2, server includes:Memory 301, processor 302 and mixed-media network modules mixed-media 303。
It is appreciated that the structure shown in Fig. 2 is only to illustrate, server may also include more more or less than shown in Fig. 2 Component, or there is the configuration different from shown in Fig. 2.Each component shown in Fig. 2 can use hardware, software or its combination Realize.In addition, the server in the embodiment of the present invention can also include the server of multiple specific difference in functionality.
Memory 301 can be used for storage software program and module, as in the embodiment of the present invention based on Hook API Corresponding programmed instruction/the module of implementation method, data transmission method, apparatus and system is acted on behalf of, processor 302 is stored by running Software program and module in memory 301, so as to perform various functions application and data processing, that is, realize the present invention Implementation method is acted on behalf of based on Hook API in embodiment.Memory 301 may include high speed random access memory, may also include non- Volatile memory, such as one or more magnetic storage device, flash memory or other non-volatile solid state memories.One In a little examples, memory 301 can further comprise relative to the remotely located memory of processor 302, these remote memories Network connection to server can be passed through.Further, above-mentioned software program and module may also include:Operating system 321 with And service module 322.Wherein operating system 321, may be, for example, LINUX, UNIX, WINDOWS, it may include various for managing The component software of system task (such as memory management, storage device control, power management etc.) and/or driving, and can with it is various Hardware or component software mutually communicate, so as to provide the running environment of other software component.Service module 322 operates in operation system On the basis of system 321, and monitored come the request of automatic network, completed according to request corresponding by the network service of operating system 321 Data processing, and return to handling result to client.That is, service module 322 is used to provide network clothes to client Business.
Mixed-media network modules mixed-media 303 is used to receiving and sending network signal.Above-mentioned network signal may include wireless signal or have Line signal.In an example, above-mentioned network signal is cable network signal.At this time, mixed-media network modules mixed-media 303 may include processor, The elements such as random access memory, converter, crystal oscillator.
First embodiment
Fig. 3 is the flow chart for acting on behalf of implementation method based on Hook API that first embodiment of the invention provides.This implementation Example for the first equipment 100, API library 200,300 and second equipment 400 of agent equipment by performed by network based on Hook API's acts on behalf of implementation method, it can be applied in the environment shown in Fig. 1.As shown in Fig. 3 and Fig. 1, the present embodiment based on The implementation method of acting on behalf of of Hook API may include following steps:
Step S11:The purpose IP address and port numbers of first equipment 100 the second equipment 400 of transmission are to API library 200, to adjust With the function in API library 200;
Specifically, the first equipment 100 can be sent according to triggering command input by user by wireless network or cable network The purpose IP address and port numbers of the second equipment 400 to be asked are to API library 200.
Step S12:According to API library 200, the agency service port of the first equipment 100 and agent equipment 300 is established and is connected Connect;
Step S13:API library 200 sends the purpose IP address of the second equipment 400 of reception and port numbers to agent equipment 300;
Wherein, the order of step S12 and step S13 is in no particular order, that is to say, that step S13 can prior to or be later than step Rapid S12 is carried out.Certainly, step S13 and step S12 can also be carried out at the same time.
Specifically, agent equipment 300 provides agency service, which corresponds to an IP address and port numbers.
It is intended to ask the 172.168.0.1 in the second equipment 400 with the first equipment 100:1001 services, agent equipment 300 The corresponding IP address of agency service and port numbers are 172.168.0.2:Exemplified by 1002:API library 200 is by the first equipment 100 and generation Manage the agency service port 172.168.0.2 of equipment 300:1002 establish connection, and second that the first equipment 100 to be asked sets Standby 400 purpose IP address and port numbers, that is, 172.168.0.1:1001 send to agent equipment 300.
Step S14:Agent equipment 300 utilizes agency service port and the purpose IP address and port numbers of the second equipment 400 Establish connection.
Specifically, agent equipment 300 send connection request to the second equipment 400 purpose IP address and port numbers, second Equipment 400 responds connection request after receiving the connection request of the transmission of agent equipment 300, to be taken with the agency of agent equipment 300 Connection is established in business port.
Specifically, the agency service port of agent equipment 300 and the purpose IP address and port numbers of the second equipment 400 are established Connection, such as the agency service port 172.168.0.2 of agent equipment 300:1002 and second equipment 400 172.168.0.1: 1001 establish connection.
It is provided in an embodiment of the present invention that implementation method is acted on behalf of by way of Hook API based on Hook API so that generation Reason equipment 300 is transparent for the first equipment 100 and the second equipment 400, and the both sides of alternating transmission data are not aware that agency sets Standby 300 presence, this makes the dilatation of agent equipment 300 and disposes very convenient.In addition, by setting generation in agent equipment 300 Reason service, and ensured by the data transfer between the API of Hook and the agency service port of agent equipment 300 by agreement Mode so that the destination interface of opposite equip. can be transferred to exactly by being transferred to the data of agent equipment 300, and need not be known The agreement between both ends is transmitted, simple agent design, performance can also greatly improve, and O&M is also convenient for.
Second embodiment
Fig. 4 is the flow chart for acting on behalf of implementation method based on Hook API that second embodiment of the invention provides.This implementation Example for the first equipment 100, API library 200,300 and second equipment 400 of agent equipment by performed by network based on Hook API's acts on behalf of implementation method.As shown in figure 4, the implementation method of acting on behalf of based on Hook API of the present embodiment may include following step Suddenly:
Step S21:Agent configuration file is added in the first equipment 100, agent configuration file is configured with the first equipment 100 The service of the second equipment 400 is asked to be forwarded by the agency service port of agent equipment 300;
Can also be it will be appreciated by those skilled in the art that adding agent configuration file in the first equipment 100 Performed after step S22.
Step S22:The purpose IP address and port numbers of first equipment 100 the second equipment 400 of transmission are to API library 200, to adjust With the function in API library 200;
Specifically, the first equipment 100 can be sent according to triggering command input by user by wireless network or cable network The purpose IP address and port numbers of second equipment 400 are to API library 200.
Step S23:API library 200 reads the agent configuration file in the first equipment 100;
Step S24:API library 200 makes the agency service port of the first equipment 100 and agent equipment 300 establish connection, and will The purpose IP address and port numbers of the second equipment 400 received are sent to agent equipment 300;
Specifically, agent equipment 300 provides agency service, the corresponding IP address of the agency service and port numbers.
It is intended to ask the 172.168.0.1 in the second equipment 400 with the first equipment 100:1001 services, agent equipment 300 The corresponding IP address of agency service and port numbers are 172.168.0.2:Exemplified by 1002:API library 200 is by the first equipment 100 and generation Manage the agency service port 172.168.0.2 of equipment 300:1002 establish connection, and second that the first equipment 100 to be asked sets Standby 400 purpose IP address and port numbers, that is, 172.168.0.1:1001 send to agent equipment 300.
Step S25:Agent equipment 300 utilizes agency service port and the purpose IP address and port numbers of the second equipment 400 Establish connection.
Specifically, such as agent equipment 300 utilizes agency service port 172.168.0.2:1002 and second equipment 400 172.168.0.1:1001 establish connection.
Step S26:The agency service port of agent equipment 300 receives the data that the first equipment 100 is sent, and data are turned It is sent to the purpose IP address and port numbers of the second equipment 400.
It is provided in an embodiment of the present invention that implementation method is acted on behalf of based on Hook API, asked by configuring the first equipment 100 The service of second equipment 400 is forwarded by the agency service port of agent equipment 300, the generation in a manner of by Hook API It is transparent for the first equipment 100 and the second equipment 400 to manage equipment 300, and the both sides of alternating transmission data are not aware that agency The presence of equipment 300, this makes the dilatation of agent equipment 300 and disposes very convenient.In addition, by being set in agent equipment 300 Agency service, and ensured by the data transfer between the API of Hook and the agency service port of agent equipment 300 by agreement Mode so that the destination interface of opposite equip. can be transferred to exactly by being transferred to the data of agent equipment 300, and need not be known Agreement between dawn transmission both ends, simple agent design, performance can also greatly improve, and O&M is also convenient for.
3rd embodiment
Fig. 5 is the flow chart for acting on behalf of implementation method based on Hook API that third embodiment of the invention provides.This implementation Example is API library 200 by acting on behalf of implementation method based on Hook API performed by network.As shown in Fig. 5 and Fig. 1, this implementation The implementation method of acting on behalf of based on Hook API of example may include following steps:
Step S31:Receive the purpose IP address and port numbers of the second equipment 400 of the first equipment 100 transmission;
Step S32:The agency service port of the first equipment 100 and agent equipment 300 is established to connect, and by the second equipment 400 purpose IP address and port numbers is sent to agent equipment 300, so that the agency service port of agent equipment 300 and the The purpose IP address and port numbers of two equipment 400 establish connection.
Further, can also include reading the agent configuration file in the first equipment 100, agency before step S31 Configuration file, which is configured with the first equipment 100, asks the service of the second equipment 400 to turn by the agency service port of agent equipment 300 Hair.
It is provided in an embodiment of the present invention that implementation method is acted on behalf of based on Hook API, asked by configuring the first equipment 100 The service of second equipment 400 is forwarded by the agency service port of agent equipment 300, the generation in a manner of by Hook API It is transparent for the first equipment 100 and the second equipment 400 to manage equipment 300, and the both sides of alternating transmission data are not aware that agency The presence of equipment 300, this makes the dilatation of agent equipment 300 and disposes very convenient.In addition, by being set in agent equipment 300 Agency service, and ensured by the data transfer between the API of Hook and the agency service port of agent equipment 300 by agreement Mode so that the destination interface of the second equipment 400, and nothing can be transferred to exactly by being transferred to the data of agent equipment 300 It need to know to transmit the agreement between both ends, simple agent design, performance can also greatly improve, and O&M is also convenient for.
The present invention also provides a kind of data transmission method, it includes the generation based on Hook API such as Fig. 3 or Fig. 4 or Fig. 5 Implementation method is managed, specific steps refer to the specific descriptions of first embodiment, second embodiment and 3rd embodiment, herein no longer Repeat.
Data transmission method provided in an embodiment of the present invention, the clothes of the second equipment 400 are asked by configuring the first equipment 100 Business is forwarded by the agency service port of agent equipment 300, and agent equipment 300 is for the in a manner of by Hook API One equipment 100 and the second equipment 400 are transparent, and the both sides of alternating transmission data are not aware that the presence of agent equipment 300, this Make the dilatation of agent equipment 300 and dispose very convenient.In addition, by agent equipment 300 set agency service, and by Data transfer between the API of Hook and the agency service port of agent equipment 300 is by way of agreement guarantee so that transmission Data to agent equipment 300 can be transferred to the destination interface of the second equipment 400 exactly, and need not know transmit both ends it Between agreement, simple agent design, performance can also greatly improve, and O&M is also convenient for.
Fourth embodiment
Fig. 6 is the structure chart that the agency based on Hook API that fourth embodiment of the invention provides realizes system.Such as Fig. 6 institutes Show, the agency based on Hook API realizes that system includes the first equipment 600, API library 601,602 and second equipment of agent equipment 603。
Wherein, the first equipment 600 send the second equipment 603 to be asked purpose IP address and port numbers to API library 601, to call the function in API library 601.
API library 601 is used to make the agency service port of the first equipment 600 and agent equipment 602 establish connection, and will receive The second equipment 603 purpose IP address and port numbers send to agent equipment 602.
Specifically, the first equipment 600 includes agent configuration file, and agent configuration file is configured with the first equipment 600 and asks The service of second equipment 603 is forwarded by the agency service port of agent equipment 602;API library 601 is read in the first equipment 600 Agent configuration file.
Wherein, agent equipment 602 is used for the purpose IP address and port numbers with the second equipment 603 using agency service port Establish connection.
Further, agent equipment 602 is additionally operable to the data for being received the first equipment 600 using agency service port and being sent, And forward the data to the purpose IP address and port numbers of the second equipment 603.
Agency provided in an embodiment of the present invention based on Hook API realizes system, is asked by configuring the first equipment 600 The service of second equipment 603 is forwarded by the agency service port of agent equipment 602, the generation in a manner of by Hook API It is transparent for the first equipment 600 and the second equipment 603 to manage equipment 602, and the both sides of alternating transmission data are not aware that agency The presence of equipment 602, this makes the dilatation of agent equipment 602 and disposes very convenient.In addition, by being set in agent equipment 602 Agency service, and ensured by the data transfer between the API of Hook and the agency service port of agent equipment 602 by agreement Mode so that the destination interface of the second equipment 603, and nothing can be transferred to exactly by being transferred to the data of agent equipment 602 It need to know to transmit the agreement between both ends, simple agent design, performance can also greatly improve, and O&M is also convenient for.
5th embodiment
Fig. 7 is the structure chart for acting on behalf of realization device based on Hook API that fifth embodiment of the invention provides.It is applied In API library, the realization device of acting on behalf of based on Hook API includes:Receiving module 710, link block 720, sending module 730.
Receiving module 710 is used for the purpose IP address and port numbers for receiving the second equipment that the first equipment is sent.Connect mould Block 720 is used to make the agency service port of the first equipment and agent equipment establish connection.Sending module 730 is used for the second equipment Purpose IP address and port numbers send to agent equipment so that the mesh of the agency service port of agent equipment and the second equipment IP address and port numbers establish connection.
Further, the realization device of acting on behalf of based on Hook API further includes read module, and read module is used to reading the Agent configuration file in one equipment, the service that agent configuration file is configured with first the second equipment of device request are set by agency Standby agency service port forwarding.
It is provided in an embodiment of the present invention that realization device is acted on behalf of based on Hook API, pass through the mode generation of HookAPI It is transparent for the first equipment and the second equipment to manage equipment, and the both sides of alternating transmission data are not aware that depositing for agent equipment , this make agent equipment dilatation and dispose it is very convenient.In addition, by agent equipment 300 set agency service, and by Data transfer between the API of Hook and the agency service port of agent equipment is by way of agreement guarantee so that is transferred to The data of agent equipment can be transferred to the destination interface of the second equipment exactly, and need not know to transmit the association between both ends View, simple agent design, performance can also greatly improve, and O&M is also convenient for.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight Point explanation is all difference with other embodiment, between each embodiment identical similar part mutually referring to. For device class embodiment, since it is substantially similar to embodiment of the method, so description is fairly simple, related part ginseng See the part explanation of embodiment of the method.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or device including a series of elements not only will including those Element, but also including other elements that are not explicitly listed, or further include as this process, method, article or device Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there are other identical element in process, method, article or device including key element.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, relevant hardware can also be instructed to complete by program, program can be stored in a kind of computer-readable storage In medium, storage medium mentioned above can be read-only storage, disk or CD etc..
More than, only it is presently preferred embodiments of the present invention, not makees limitation in any form to the present invention, although this Invention is disclosed above with preferred embodiment, but is not limited to the present invention, any person skilled in the art, Do not depart from the range of technical solution of the present invention, when the technology contents using the disclosure above make a little change or are modified to equivalent The equivalent embodiment of change, as long as being without departing from technical solution of the present invention content, the technical spirit according to the present invention is real to more than Any simple modification, equivalent change and modification that example is made is applied, in the range of still falling within technical solution of the present invention.

Claims (11)

1. a kind of act on behalf of implementation method based on Hook API, it is characterised in that including:
The purpose IP address and port numbers of first equipment the second equipment of transmission are to API library, to call the function in the API library;
According to the API library, the agency service port of first equipment and agent equipment is established and is connected;
The API library sends the purpose IP address of second equipment of reception and port numbers to the agent equipment;And
The agent equipment is established using the purpose IP address and port numbers of agency service port and second equipment and connected.
2. implementation method is acted on behalf of based on Hook API as claimed in claim 1, it is characterised in that, will according to the API library The agency service port of first equipment and agent equipment further includes before establishing the step of connection:
The API library reads the agent configuration file in first equipment, and the agent configuration file is configured with described first The service of second equipment described in device request is forwarded by the agency service port of the agent equipment.
3. implementation method is acted on behalf of based on Hook API as claimed in claim 1 or 2, it is characterised in that the agent equipment Being established using the purpose IP address and port numbers of agency service port and second equipment after the step of connecting is included:
After the agency service port of the agent equipment receives the data that first equipment is sent, forward the data on to institute State the purpose IP address and port numbers of the second equipment.
A kind of 4. data transmission method, it is characterised in that the described method includes:
Implementation method is acted on behalf of based on Hook API as described in claim 1 to 2 any one;And
The agency service port of the agent equipment receives the data that first equipment is sent, and forwards the data on to institute State the purpose IP address and port numbers of the second equipment.
5. a kind of act on behalf of implementation method based on Hook API, applied to API library, it is characterised in that including:
Receive the purpose IP address and port numbers of the second equipment of the first equipment transmission;And
The agency service port of first equipment and agent equipment is set to establish connection, and by the destination IP of second equipment Location and port numbers are sent to the agent equipment, so that the agency service port of the agent equipment and second equipment Purpose IP address and port numbers establish connection.
6. implementation method is acted on behalf of based on Hook API as claimed in claim 5, it is characterised in that make first equipment with The agency service port of agent equipment further includes before establishing the step of connection:
The API library reads the agent configuration file in first equipment, and the agent configuration file is configured with described first The service of second equipment described in device request is forwarded by the agency service port of the agent equipment.
7. a kind of agency based on Hook API realizes system, it is characterised in that the agency based on HookAPI realizes system Including the first equipment, API library, agent equipment and the second equipment;
First equipment is used for the purpose IP address for sending second equipment and port numbers to the API library, to call State the function in API library;
The API library is used to make the agency service port of first equipment and the agent equipment establish connection, and will receive Second equipment purpose IP address and port numbers send to the agent equipment;
The agent equipment is used to be established using the purpose IP address and port numbers of agency service port and second equipment and connected Connect.
8. the agency as claimed in claim 7 based on Hook API realizes system, it is characterised in that the agent equipment is also used In the data sent using agency service port reception first equipment, and forward the data on to second equipment Purpose IP address and port numbers.
9. the agency as claimed in claim 7 or 8 based on Hook API realizes system, it is characterised in that first equipment Including agent configuration file, the service that the agent configuration file is configured with the second equipment described in first device request passes through The agency service port forwarding of the agent equipment;The API library is additionally operable to read the proxy configurations text in first equipment Part.
10. a kind of act on behalf of realization device based on Hook API, applied to API library, it is characterised in that described to be based on Hook API Realization device of acting on behalf of include:
Receiving module, the purpose IP address and port numbers of the second equipment sent for receiving the first equipment;
Connection is established in link block, the agency service port for making first equipment and agent equipment;And
Sending module, for sending the purpose IP address of second equipment and port numbers to the agent equipment, so that The purpose IP address and port numbers of the agency service port of the agent equipment and second equipment, which are established, to be connected.
11. realization device is acted on behalf of based on Hook API as claimed in claim 10, it is characterised in that described to be based on Hook The realization device of acting on behalf of of API further includes read module, and the read module is used to read the proxy configurations in first equipment File, the agent configuration file are configured with the generation that the service of the second equipment described in first device request passes through agent equipment Manage serve port forwarding.
CN201610896058.8A 2016-10-13 2016-10-13 Hook API-based proxy implementation method, data transmission method, device and system Active CN107948232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610896058.8A CN107948232B (en) 2016-10-13 2016-10-13 Hook API-based proxy implementation method, data transmission method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610896058.8A CN107948232B (en) 2016-10-13 2016-10-13 Hook API-based proxy implementation method, data transmission method, device and system

Publications (2)

Publication Number Publication Date
CN107948232A true CN107948232A (en) 2018-04-20
CN107948232B CN107948232B (en) 2021-03-19

Family

ID=61928554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610896058.8A Active CN107948232B (en) 2016-10-13 2016-10-13 Hook API-based proxy implementation method, data transmission method, device and system

Country Status (1)

Country Link
CN (1) CN107948232B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294399A (en) * 2020-02-04 2020-06-16 网宿科技股份有限公司 Data transmission method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968227A (en) * 2006-06-29 2007-05-23 华为技术有限公司 System and method for enabling wireless access gateway to support transparent agent
CN103916405A (en) * 2014-04-25 2014-07-09 厦门享游网络科技有限公司 Method for guiding flow of TCP/UDP of App on IOS
CN103944906A (en) * 2014-04-25 2014-07-23 厦门享游网络科技有限公司 HTTP traffic guiding method on iOS for APP
US20150106812A1 (en) * 2013-10-16 2015-04-16 Power-All Networks Limited Cloud gateway, cloud gateway management device, and method thereof
CN105450521A (en) * 2015-12-31 2016-03-30 中国电子科技集团公司电子科学研究院 Software-defined real-time dynamic optimization method of multipath network flow

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968227A (en) * 2006-06-29 2007-05-23 华为技术有限公司 System and method for enabling wireless access gateway to support transparent agent
US20150106812A1 (en) * 2013-10-16 2015-04-16 Power-All Networks Limited Cloud gateway, cloud gateway management device, and method thereof
CN103916405A (en) * 2014-04-25 2014-07-09 厦门享游网络科技有限公司 Method for guiding flow of TCP/UDP of App on IOS
CN103944906A (en) * 2014-04-25 2014-07-23 厦门享游网络科技有限公司 HTTP traffic guiding method on iOS for APP
CN105450521A (en) * 2015-12-31 2016-03-30 中国电子科技集团公司电子科学研究院 Software-defined real-time dynamic optimization method of multipath network flow

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294399A (en) * 2020-02-04 2020-06-16 网宿科技股份有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN107948232B (en) 2021-03-19

Similar Documents

Publication Publication Date Title
US11003639B2 (en) Database data migration method, apparatus, terminal, system, and storage medium
CN102843436B (en) A kind of device management method, equipment, server and system
CN102739654B (en) Method for realizing application program to access database
US8839403B2 (en) Local proxy system and method
CN104133728B (en) Method and device for communication between processes
CN106534178B (en) System and method for realizing RapidIO network universal socket
US7660875B2 (en) Bidirectional remote communication via browser plug-in
US20130058266A1 (en) Method and system for realizing wireless USB flash disk
CN108536617A (en) Buffer memory management method, medium, system and electronic equipment
CN111459632B (en) Serial port agent for calling terminal application program and implementation method
KR101559089B1 (en) Communication protocol for sharing memory resources between components of a device
KR100679865B1 (en) A System to Support the Heterogeneity in Ubiquitous Computing Environment
CN104702634B (en) Data operation request treatment method, apparatus and system
CN109889468A (en) Transmission method, system, device, equipment and the storage medium of network data
CN101080899B (en) Method and system for remote server administration
JP4864703B2 (en) Device for supplying service using related portable memory, and relay means for enabling activation of portable memory application of first device by second device
CN107948232A (en) Implementation method, data transmission method, apparatus and system are acted on behalf of based on Hook API
CN105573801A (en) Method for realizing software upgrading in stacking system as well as device and system
US9092779B2 (en) Heuristics processing
KR100884271B1 (en) Remote storage service and service method using wireless terminal
CN104683419A (en) Communicating method and system based on android system and m2m (machine to machine)
CN1586085B (en) Method for enabling an application recorded in a radiocommunication terminal to access functions of the terminal and terminal implementing said method
KR101561524B1 (en) System for managing Remote User Interface and Method thereof
CN113271229B (en) Equipment control method and device, storage equipment, safety equipment, switch, router and server
US9380085B2 (en) Server and method for providing collaboration service, and sociality management server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant