CN107332924A - The reverse proxy method and device replaced based on dynamic URL - Google Patents

The reverse proxy method and device replaced based on dynamic URL Download PDF

Info

Publication number
CN107332924A
CN107332924A CN201710624287.9A CN201710624287A CN107332924A CN 107332924 A CN107332924 A CN 107332924A CN 201710624287 A CN201710624287 A CN 201710624287A CN 107332924 A CN107332924 A CN 107332924A
Authority
CN
China
Prior art keywords
request
response
url
inclusion
field
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
CN201710624287.9A
Other languages
Chinese (zh)
Other versions
CN107332924B (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.)
Beijing Qianxin Technology Co Ltd
Original Assignee
Beijing Qianxin Technology 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 Beijing Qianxin Technology Co Ltd filed Critical Beijing Qianxin Technology Co Ltd
Priority to CN201710624287.9A priority Critical patent/CN107332924B/en
Publication of CN107332924A publication Critical patent/CN107332924A/en
Application granted granted Critical
Publication of CN107332924B publication Critical patent/CN107332924B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The present invention provides a kind of reverse proxy method and device replaced based on dynamic URL, and methods described includes:The request that client is sent is received, the request is parsed and obtains request header and request inclusion;URL replacements, the destination request after being replaced are carried out to the request header and request inclusion according to default up Substitution Rules;The destination request is transmitted to the server.A kind of reverse proxy method and device replaced based on dynamic URL provided in an embodiment of the present invention, by receiving the request that client is sent, parsing obtains request header and request inclusion, URL replacements are carried out to the request header and request inclusion according to default up Substitution Rules and obtain destination request, destination request is transmitted to the server, access security and dynamic mapping resource can be reached.

Description

The reverse proxy method and device replaced based on dynamic URL
Technical field
The present invention relates to network communication technology field, more particularly to a kind of reverse proxy method replaced based on dynamic URL And device.
Background technology
Be directed to the protection of Saas service datas, typically using reverse proxy by the way of carry out the acquisition and interception of data, I.e. by the domain name access Reverse Proxy specified, reverse proxy, which has been handled, relays to Saas service processings after data.
Replace, but by the way of ip address of cache, i.e., had in reverse proxy without dynamic URL in the prior art Individual static mappings table, and address can be changed sometimes in cloud service therefore the mode of this static mappings is not applied to, influence Data access security.
The content of the invention
The present invention provides a kind of reverse proxy method and device replaced based on dynamic URL, for solving in the prior art The problem of security brought of address of cache is low is carried out using static mappings table.
In a first aspect, the present invention provides a kind of reverse proxy method replaced based on dynamic URL, including:
The request that client is sent is received, the request is parsed and obtains request header and request inclusion;
URL replacements are carried out to the request header and request inclusion according to default up Substitution Rules, after being replaced Destination request;
The destination request is transmitted to the server.
Alternatively, in addition to:
The response that the server is sent is received, analyzes the response to obtain head response and response inclusion;
URL replacements are carried out to the head response and response inclusion according to default descending Substitution Rules, after being replaced Target response;
The target response is transmitted to the client.
Alternatively, it is described that URL replacements are carried out to the request header and request inclusion according to default up Substitution Rules, obtain Destination request after to replacement, including:
Parsing is carried out to the request header and request inclusion and obtains default replacement field, the replacement word on respective URL Section includes header fields, trailer field and middle field;
The header fields and the corresponding head ID of trailer field and afterbody domain name are deleted, and preserve head ID and afterbody Domain name, and corresponding first substitute character of the middle field is substituted for the second substitute character;
Regenerate the URL after replacing, the destination request after being replaced.
Alternatively, it is described that URL replacements are carried out to the head response and response inclusion according to default descending Substitution Rules, obtain Target response after to replacement, including:
Parsing is carried out to the head response and response inclusion and obtains default replacement field, the replacement word on respective URL Section includes header fields, trailer field and middle field;
Head ID and afterbody domain are increased on the header fields and trailer field according to the corresponding relation of up-downgoing session Name, and the corresponding second replacement field of the middle field is substituted for the first substitute character;
Regenerate the URL after replacing, the target response after being replaced.
Second aspect, the present invention provides a kind of reverse proxy device replaced based on dynamic URL, including:
First receiving module, the request for receiving client transmission parses the request and obtains request header and request bag Body;
First replacement module, for carrying out URL to the request header and request inclusion according to default up Substitution Rules Replace, the destination request after being replaced;
First forwarding module, for the destination request to be transmitted into the server.
Alternatively, in addition to:
Second receiving module, for receiving the response that the server is sent, analyzes the response to obtain head response and sound Answer inclusion;
Second replacement module, for carrying out URL to the head response and response inclusion according to default descending Substitution Rules Replace, the target response after being replaced;
Second forwarding module, for the target response to be transmitted into the client.
Alternatively, first replacement module specifically for:
Parsing is carried out to the request header and request inclusion and obtains default replacement field, the replacement word on respective URL Section includes header fields, trailer field and middle field;
The header fields and the corresponding head ID of trailer field and afterbody domain name are deleted, and preserve head ID and afterbody Domain name, and corresponding first substitute character of the middle field is substituted for the second substitute character;
Regenerate the URL after replacing, the destination request after being replaced.
Alternatively, second replacement module specifically for:
Parsing is carried out to the head response and response inclusion and obtains default replacement field, the replacement word on respective URL Section includes header fields, trailer field and middle field;
Head ID and afterbody domain are increased on the header fields and trailer field according to the corresponding relation of up-downgoing session Name, and the corresponding second replacement field of the middle field is substituted for the first substitute character;
Regenerate the URL after replacing, the target response after being replaced.
The third aspect, the present invention provides a kind of electronic equipment, including:Processor, memory, bus and it is stored in memory Computer program that is upper and can running on a processor;
Wherein, the processor, memory completes mutual communication by the bus;
Method described above is realized described in the computing device during computer program.
Fourth aspect, the present invention provides a kind of non-transient computer readable storage medium storing program for executing, and the non-transient computer is readable Be stored with computer program on storage medium, and the computer program realizes method described above when being executed by processor.
As shown from the above technical solution, a kind of reverse proxy side replaced based on dynamic URL provided in an embodiment of the present invention Method and device, by receiving the request of client transmission, parsing obtains request header and request inclusion, according to default up replacement Rule carries out URL replacements to the request header and request inclusion and obtains destination request, and destination request is transmitted into the server, Simultaneously also by receiving the response that the server is sent, parsing obtains head response and response inclusion;Descending replaced according to default Change rule the head response and response inclusion progress URL are replaced and obtain target response;Target response is transmitted to the client End, can reach access security and dynamic mapping resource.
Brief description of the drawings
The schematic flow sheet based on the dynamic URL reverse proxy methods replaced that Fig. 1 provides for one embodiment of the invention;
The schematic flow sheet for the step S12 that Fig. 2 provides for one embodiment of the invention;
The entire block diagram based on the dynamic URL reverse proxy methods replaced that Fig. 3 provides for one embodiment of the invention;
The schematic flow sheet for the up replacement that Fig. 4 provides for one embodiment of the invention;
The schematic flow sheet based on the dynamic URL reverse proxy methods replaced that Fig. 5 provides for one embodiment of the invention;
The schematic flow sheet for the step S22 that Fig. 6 provides for one embodiment of the invention;
The schematic flow sheet for the descending replacement that Fig. 7 provides for one embodiment of the invention;
The schematic flow sheet based on the dynamic URL reverse proxy methods replaced that Fig. 8 provides for one embodiment of the invention;
The structural representation based on the dynamic URL reverse proxy devices replaced that Fig. 9 provides for one embodiment of the invention;
The structural representation based on the dynamic URL reverse proxy devices replaced that Figure 10 provides for one embodiment of the invention;
The structural representation based on the dynamic URL reverse proxy devices replaced that Figure 11 provides for one embodiment of the invention;
The structural representation for the base electronic equipment that Figure 12 provides for one embodiment of the invention.
Embodiment
With reference to the accompanying drawings and examples, the embodiment to the present invention is described in further detail.Implement below Example is used to illustrate the present invention, but is not limited to the scope of the present invention.
Fig. 1 shows that one embodiment of the invention provides a kind of reverse proxy method replaced based on dynamic URL, including:
S11, the request for receiving client transmission, parse the request and obtain request header and ask inclusion.
In this step, it is necessary to which explanation, in embodiments of the present invention, client can be sent to dns server first The general domain name of user's registration.Dns server carries out the IP that parsing obtains Reverse Proxy to the general domain name of user's registration, and Return to user terminal.Dns server is computer domain name system (Domain Name System or Domain Name Service abbreviation), it is made up of Domain Name Resolver and name server.Name server refers to preserve the network The domain name and correspondence IP address of middle All hosts, and with the server that domain name is converted to IP address function.Wherein domain name must Palpus one IP address of correspondence, and IP address not necessarily has domain name.
During user end to server sends access request, the request is received by Reverse Proxy, to request Carry out parsing and obtain request header and request inclusion.
S12, according to default up Substitution Rules to the request header and request inclusion carry out URL replacements, replaced Destination request afterwards.
In this step, it is necessary to which explanation, in embodiments of the present invention, includes visit in request header and request inclusion Ask address URL.Therefore, Reverse Proxy can enter according to default up Substitution Rules to the request header and request inclusion Row URL is replaced.
Replaced for above-mentioned URL, need further explanation to illustrate, as shown in Fig. 2 specific as follows:
S121, parsing is carried out to the request header and request inclusion obtain default replacement field on respective URL, it is described to replace Changing field includes header fields, trailer field and middle field.
In this step S121, Reverse Proxy can parse configuration item, obtain ID and domain name.It can be asked simultaneously to described Ask head and request inclusion each to carry out parsing and obtain default replacement field on respective URL.The default replacement field is at this The field specified in embodiment replacement process.In order to distinguish and be applicable the explanation of the replacement in the present embodiment, field name will be replaced And it is divided into header fields, trailer field and middle field.
S122, the header fields and the corresponding head ID of trailer field and afterbody domain name deleted, and preserve head ID With afterbody domain name, and corresponding first substitute character of the middle field is substituted for the second substitute character.
In this step S122, Reverse Proxy is respectively to request header and the header fields and afterbody word of request inclusion Duan Jinhang heads ID and afterbody domain name matching, can be by the header fields and the corresponding head of trailer field after the match is successful ID and afterbody domain name are deleted, and preserve corresponding head ID and afterbody domain name.Head ID is the increased application identities of user. Afterbody domain name is subscriber self-registration domain name.
The first substitute character also corresponding to middle field is substituted for the second substitute character simultaneously.In the embodiment of the present invention In, the first substitute character includes " " and "-".Second substitute character includes "-" and " -- ".Will " " replace with "-", by "-" Replace with " -- ".
It is illustrated in figure 3 this entire block diagram based on the dynamic URL reverse proxy methods replaced.From the step mark in Fig. 3 Numbers 3 as can be seen that the URL for the requests that client is sent are ck-login-salesforce-com.360casb.com/ ..., and The head ID that user accesses is ck, and subscriber self-registration domain name is * .360casb.com.As the step label 4 in Fig. 3 can be seen Go out, URL replaces with login.salesforce.com/ after reverse proxy ....
It is illustrated in figure 4 the idiographic flow schematic diagram of up replacement.It can be seen that Reverse Proxy is parsed Configuration item, obtains ID and domain name, and the request header got is handled first.By ID and domain name in the default of request header Matching is searched in field, and the ID matched and domain name are preserved after the match is successful into up-downgoing conversational list, while removing request Head ID and afterbody domain name in head.Then request inclusion is handled, by the ID and domain name after preservation in request inclusion Matching is searched in URL, head ID and afterbody domain name in URL in removing request inclusion after the match is successful.If it can not match Terminate the processing.
S123, regenerate replace after URL, the destination request after being replaced.
In this step, the URL after replacement is regenerated, and is stored in the request.
S13, the destination request is transmitted to the server.
In this step, it is necessary to illustrate, because the purpose of client is to send the requests to server (salesforce).Therefore the request after replacement can be transmitted to the server by Reverse Proxy.
A kind of reverse proxy method replaced based on dynamic URL provided in an embodiment of the present invention, is sent out by receiving client The request sent, parsing obtains request header and request inclusion, according to default up Substitution Rules to the request header and request bag Body carries out URL replacements and obtains destination request, and destination request is transmitted into the server, access security and dynamic can be reached Map resource.
Fig. 5 shows that one embodiment of the invention provides a kind of reverse proxy method replaced based on dynamic URL, including:
S21, the response for receiving the server transmission, analyze the response to obtain head response and response inclusion.
In this step, it is necessary to which explanation, in embodiments of the present invention, server can be according to access requests to client Send and return to response.The response is reversed proxy server and received, and carrying out parsing to request obtains head response and response inclusion.
S22, according to default descending Substitution Rules URL replacements are carried out to the head response and response inclusion, replaced Target response afterwards.
In this step, it is necessary to which explanation, in embodiments of the present invention, includes visit in head response and response inclusion Ask address URL.Therefore, Reverse Proxy can enter according to default descending Substitution Rules to the head response and response inclusion Row URL is replaced.
Replaced for above-mentioned URL, need further explanation to illustrate, as shown in fig. 6, specific as follows:
S221, parsing is carried out to the head response and response inclusion obtain default replacement field on respective URL, it is described to replace Changing field includes header fields, trailer field and middle field.
In this step S221, Reverse Proxy can parse configuration item, obtain the head response and response inclusion is each Default replacement field on respective URL is obtained from parsing is carried out.The default replacement field is in the present embodiment replacement process The field specified.In order to distinguish and be applicable the explanation of the replacement in the present embodiment, field name will be replaced and be divided into header fields, tail Portion's field and middle field.
S222, head ID and tail increased on the header fields and trailer field according to the corresponding relation of up-downgoing session Portion's domain name, and the corresponding second replacement field of the middle field is substituted for the first substitute character.
In this step S222, Reverse Proxy is respectively to head response and the header fields and afterbody word of response inclusion Duan Jinhang heads ID and afterbody domain name matching, can be by the corresponding ID in up-downgoing conversational list and domain after the match is successful Name increases head ID and afterbody domain name on the header fields and trailer field.
The second substitute character also corresponding to middle field is substituted for the first substitute character simultaneously.In the embodiment of the present invention In, the first substitute character includes " " and "-".Second substitute character includes "-" and " -- "."-" is replaced with into " ", by " -- " Replace with "-".
It is illustrated in figure 3 this entire block diagram based on the dynamic URL reverse proxy methods replaced.From the step mark in Fig. 3 Numbers 5 as can be seen that the URL for the responses that server is sent are * .salesforce.com/ ....Can be with from the step label 6 in Fig. 3 Find out, the URL after reverse proxy is ck-*-salesforce-com-360casb.com/ ....
It is illustrated in figure 7 the idiographic flow schematic diagram of descending replacement.It can be seen that Reverse Proxy is parsed Configuration item, obtains the response for needing to be handled from multiple response.Head response is handled first, obtains and replaces field (such as Location fields and refresh fields), field is matched, if after the match is successful, talked with according to up-downgoing in table and obtained The ID and domain name of preservation, increase ID and domain name in field.Then with the ID in same matching process processing response inclusion and Domain name.
S223, regenerate replace after URL, the target response after being replaced.
In this step, the URL after replacement is regenerated, and is stored in the response.
S23, the target response is transmitted to the client.
In this step, it is necessary to illustrate, because the purpose of server is to send responses to server (salesforce).Therefore the response after replacement can be transmitted to the client by Reverse Proxy.
A kind of reverse proxy method replaced based on dynamic URL provided in an embodiment of the present invention, by receiving the service The response that device is sent, parsing obtains head response and response inclusion;According to default descending Substitution Rules to the head response and sound Answer inclusion to carry out URL replacements and obtain target response;Target response is transmitted to the client, can reach access security and Dynamic mapping resource.
Fig. 8 shows the reverse proxy method replaced based on dynamic URL that one embodiment of the invention is provided, including:
S31, the request for receiving client transmission, parse the request and obtain request header and ask inclusion;
S32, according to default up Substitution Rules to the request header and request inclusion carry out URL replacements, replaced Destination request afterwards;
S33, the destination request is transmitted to the server;
S34, the response for receiving the server transmission, analyze the response to obtain head response and response inclusion;
S35, according to default descending Substitution Rules URL replacements are carried out to the head response and response inclusion, replaced Target response afterwards;
S36, the target response is transmitted to the client.
In the present embodiment, the step S31- steps S33 and step S11- steps S13 in above-described embodiment is in implementation procedure In it is identical, will not be repeated here.
In the present embodiment, the step S34- steps S36 and step S21- steps S23 in above-described embodiment is in implementation procedure In it is identical, will not be repeated here.
A kind of reverse proxy method replaced based on dynamic URL provided in an embodiment of the present invention, is sent out by receiving client The request sent, parsing obtains request header and request inclusion, according to default up Substitution Rules to the request header and request bag Body carries out URL replacements and obtains destination request, destination request is transmitted into the server, while also by receiving the server The response of transmission, parsing obtains head response and response inclusion;According to default descending Substitution Rules to the head response and response Inclusion carries out URL replacements and obtains target response;Target response is transmitted to the client, access security can be reached and dynamic State maps resource.
Fig. 9 shows a kind of reverse proxy device replaced based on dynamic URL that one embodiment of the invention is provided, including the One receiving module 41, the first replacement module 42 and the first forwarding module 43, wherein:
First receiving module 41, the request for receiving client transmission parses the request and obtains request header and request Inclusion;
First replacement module 42, for being carried out according to default up Substitution Rules to the request header and request inclusion URL is replaced, the destination request after being replaced;
First forwarding module 43, for the destination request to be transmitted into the server.
In the process of implementation, the first receiving module 41 receives the request that client is sent, and parsing obtains request header and request Inclusion, and request header and request inclusion are sent to the first replacement module.First replacement module 42 is according to default up replacement Rule carries out URL replacements to the request header and request inclusion, and generates destination request, is sent to the first forwarding module.First Destination request is transmitted to the server by forwarding module 43.
Because described device of the embodiment of the present invention is identical with the principle of above-described embodiment methods described, for more detailed Explain that content will not be repeated here.
It should be noted that can be by hardware processor (hardware processor) come real in the embodiment of the present invention Existing related function module.
A kind of reverse proxy device replaced based on dynamic URL provided in an embodiment of the present invention, is sent out by receiving client The request sent, parsing obtains request header and request inclusion, according to default up Substitution Rules to the request header and request bag Body carries out URL replacements and obtains destination request, and destination request is transmitted into the server, access security and dynamic can be reached Map resource.
Figure 10 shows the reverse proxy device replaced based on dynamic URL that one embodiment of the invention is provided, including second Receiving module 51, the second replacement module 52 and the second forwarding module 53, wherein:
Second receiving module 51, for receiving the response that the server is sent, analyze the response to obtain head response and Response inclusion;
Second replacement module 52, for being carried out according to default descending Substitution Rules to the head response and response inclusion URL is replaced, the target response after being replaced;
Second forwarding module 53, for the target response to be transmitted into the client.
In the process of implementation, the second receiving module 51 receives the response that the server is sent, parsing obtain head response and Response inclusion, the second replacement module is sent to by head response and response inclusion.Second replacement module 52 descending is replaced according to default Change rule and URL replacements are carried out to the head response and response inclusion, and generate target response, be sent to the second forwarding module.The Target response is transmitted to the client by two forwarding modules 53.
Because described device of the embodiment of the present invention is identical with the principle of above-described embodiment methods described, for more detailed Explain that content will not be repeated here.
It should be noted that can be by hardware processor (hardware processor) come real in the embodiment of the present invention Existing related function module.
A kind of reverse proxy device replaced based on dynamic URL provided in an embodiment of the present invention, by receiving the service The response that device is sent, parsing obtains head response and response inclusion;According to default descending Substitution Rules to the head response and sound Answer inclusion to carry out URL replacements and obtain target response;Target response is transmitted to the client, can reach access security and Dynamic mapping resource.
Figure 11 shows the reverse proxy device replaced based on dynamic URL that one embodiment of the invention is provided, including first Receiving module 61, the first replacement module 62, the first forwarding module 63, the second receiving module 64, the second replacement module 65 and second Forwarding module 66, wherein:
First receiving module 61, the request for receiving client transmission parses the request and obtains request header and request Inclusion;
First replacement module 62, for being carried out according to default up Substitution Rules to the request header and request inclusion URL is replaced, the destination request after being replaced;
First forwarding module 63, for the destination request to be transmitted into the server;
Second receiving module 64, for receiving the response that the server is sent, analyze the response to obtain head response and Response inclusion;
Second replacement module 65, for being carried out according to default descending Substitution Rules to the head response and response inclusion URL is replaced, the target response after being replaced;
Second forwarding module 66, for the target response to be transmitted into the client.
Because described device of the embodiment of the present invention is identical with the principle of above-described embodiment methods described, for more detailed Explain that content will not be repeated here.
It should be noted that can be by hardware processor (hardware processor) come real in the embodiment of the present invention Existing related function module.
A kind of reverse proxy device replaced based on dynamic URL provided in an embodiment of the present invention, is sent out by receiving client The request sent, parsing obtains request header and request inclusion, according to default up Substitution Rules to the request header and request bag Body carries out URL replacements and obtains destination request, destination request is transmitted into the server, while also by receiving the server The response of transmission, parsing obtains head response and response inclusion;According to default descending Substitution Rules to the head response and response Inclusion carries out URL replacements and obtains target response;Target response is transmitted to the client, access security can be reached and dynamic State maps resource.
Figure 12 shows a kind of electronic equipment that one embodiment of the invention is provided, including:Processor 701, the and of memory 702 Bus 703, wherein,
The processor and the memory complete mutual communication by the bus;
The memory storage has can be by the programmed instruction of the computing device, to perform above-mentioned each method embodiment institute The method of offer, for example including:The request that client is sent is received, the request is parsed and obtains request header and request inclusion;Root URL replacements, the destination request after being replaced are carried out to the request header and request inclusion according to default up Substitution Rules;Will The destination request is transmitted to the server.
In addition, also including:The response that the server is sent is received, analyzes the response to obtain head response and response bag Body;URL replacements are carried out to the head response and response inclusion according to default descending Substitution Rules, the target after being replaced is rung Should;The target response is transmitted to the client.
A kind of non-transient computer readable storage medium storing program for executing that one embodiment of the invention is provided, the non-transient computer is readable Storage medium stores computer instruction, and the computer instruction makes the computer perform what above-mentioned each method embodiment was provided Method, for example including:The request that client is sent is received, the request is parsed and obtains request header and request inclusion;According to default Up Substitution Rules to the request header and request inclusion carry out URL replacements, the destination request after being replaced;By the mesh Mark request is transmitted to the server.
In addition, also including:The response that the server is sent is received, analyzes the response to obtain head response and response bag Body;URL replacements are carried out to the head response and response inclusion according to default descending Substitution Rules, the target after being replaced is rung Should;The target response is transmitted to the client.
Although in addition, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of be the same as Example does not mean in of the invention Within the scope of and form different embodiments.For example, in the following claims, times of embodiment claimed One of meaning mode can be used in any combination.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and coming real by means of properly programmed computer It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
One of ordinary skill in the art will appreciate that:Various embodiments above is merely illustrative of the technical solution of the present invention, and It is non-that it is limited;Although the present invention is described in detail with reference to foregoing embodiments, one of ordinary skill in the art It should be understood that:It can still modify to the technical scheme described in foregoing embodiments, or to which part or All technical characteristic carries out equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from this hair Bright claim limited range.

Claims (10)

1. a kind of reverse proxy method replaced based on dynamic URL, it is characterised in that including:
The request that client is sent is received, the request is parsed and obtains request header and request inclusion;
URL replacements, the target after being replaced are carried out to the request header and request inclusion according to default up Substitution Rules Request;
The destination request is transmitted to the server.
2. according to the method described in claim 1, it is characterised in that also include:
The response that the server is sent is received, analyzes the response to obtain head response and response inclusion;
URL replacements, the target after being replaced are carried out to the head response and response inclusion according to default descending Substitution Rules Response;
The target response is transmitted to the client.
3. according to the method described in claim 1, it is characterised in that it is described according to default up Substitution Rules to the request Head and request inclusion progress URL replacements, the destination request after being replaced, including:
Parsing is carried out to the request header and request inclusion and obtains default replacement field, the replacement field bag on respective URL Include header fields, trailer field and middle field;
The header fields and the corresponding head ID of trailer field and afterbody domain name are deleted, and preserve head ID and afterbody domain Name, and corresponding first substitute character of the middle field is substituted for the second substitute character;
Regenerate the URL after replacing, the destination request after being replaced.
4. method according to claim 2, it is characterised in that it is described according to default descending Substitution Rules to the response Head and response inclusion progress URL replacements, the target response after being replaced, including:
Parsing is carried out to the head response and response inclusion and obtains default replacement field, the replacement field bag on respective URL Include header fields, trailer field and middle field;
Head ID and afterbody domain name are increased on the header fields and trailer field according to the corresponding relation of up-downgoing session, with And the corresponding second replacement field of the middle field is substituted for the first substitute character;
Regenerate the URL after replacing, the target response after being replaced.
5. a kind of reverse proxy device replaced based on dynamic URL, it is characterised in that including:
First receiving module, the request for receiving client transmission parses the request and obtains request header and request inclusion;
First replacement module, for carrying out URL replacements to the request header and request inclusion according to default up Substitution Rules, Destination request after being replaced;
First forwarding module, for the destination request to be transmitted into the server.
6. device according to claim 5, it is characterised in that also include:
Second receiving module, for receiving the response that the server is sent, analyzes the response to obtain head response and response bag Body;
Second replacement module, for carrying out URL replacements to the head response and response inclusion according to default descending Substitution Rules, Target response after being replaced;
Second forwarding module, for the target response to be transmitted into the client.
7. device according to claim 5, it is characterised in that first replacement module specifically for:
Parsing is carried out to the request header and request inclusion and obtains default replacement field, the replacement field bag on respective URL Include header fields, trailer field and middle field;
The header fields and the corresponding head ID of trailer field and afterbody domain name are deleted, and preserve head ID and afterbody domain Name, and corresponding first substitute character of the middle field is substituted for the second substitute character;
Regenerate the URL after replacing, the destination request after being replaced.
8. device according to claim 6, it is characterised in that second replacement module specifically for:
Parsing is carried out to the head response and response inclusion and obtains default replacement field, the replacement field bag on respective URL Include header fields, trailer field and middle field;
Head ID and afterbody domain name are increased on the header fields and trailer field according to the corresponding relation of up-downgoing session, with And the corresponding second replacement field of the middle field is substituted for the first substitute character;
Regenerate the URL after replacing, the target response after being replaced.
9. a kind of electronic equipment, it is characterised in that including:Processor, memory, bus and store on a memory and can locate The computer program run on reason device;
Wherein, the processor, memory completes mutual communication by the bus;
The method as any one of claim 1-4 is realized described in the computing device during computer program.
10. a kind of non-transient computer readable storage medium storing program for executing, it is characterised in that on the non-transient computer readable storage medium storing program for executing Be stored with computer program, and the side as any one of claim 1-4 is realized when the computer program is executed by processor Method.
CN201710624287.9A 2017-07-27 2017-07-27 Reverse proxy method and device based on dynamic URL replacement Active CN107332924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710624287.9A CN107332924B (en) 2017-07-27 2017-07-27 Reverse proxy method and device based on dynamic URL replacement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710624287.9A CN107332924B (en) 2017-07-27 2017-07-27 Reverse proxy method and device based on dynamic URL replacement

Publications (2)

Publication Number Publication Date
CN107332924A true CN107332924A (en) 2017-11-07
CN107332924B CN107332924B (en) 2020-06-23

Family

ID=60227887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710624287.9A Active CN107332924B (en) 2017-07-27 2017-07-27 Reverse proxy method and device based on dynamic URL replacement

Country Status (1)

Country Link
CN (1) CN107332924B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108377274A (en) * 2018-02-09 2018-08-07 弘成科技发展有限公司 Configurable dynamic domain name processing engine based on SaaS and processing method
CN108600333A (en) * 2018-04-03 2018-09-28 广东阿里影业云智软件有限公司 A kind of data transmission method, equipment and system based on proxy server
CN110417852A (en) * 2019-06-12 2019-11-05 山谷网安科技股份有限公司 Browser-cross controls the universal method of peripheral hardware, apparatus and system
CN110413350A (en) * 2019-08-05 2019-11-05 中国林业科学研究院热带林业研究所 Request processing method, system, server and storage medium based on dynamic mapping plug-in unit
CN111460460A (en) * 2020-04-02 2020-07-28 北京金山云网络技术有限公司 Task access method, device, proxy server and machine-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278487A1 (en) * 2011-04-27 2012-11-01 Woelfel John Harold System and method of handling requests in a multi-homed reverse proxy
CN102780711A (en) * 2011-05-09 2012-11-14 腾讯科技(深圳)有限公司 Method, device and system for accessing application data of SNS (Social Network Site)
US8365271B2 (en) * 2008-02-27 2013-01-29 International Business Machines Corporation Controlling access of a client system to access protected remote resources supporting relative URLs
CN104954384A (en) * 2015-06-24 2015-09-30 浙江大学 Url (uniform resource locator) pseudo method for protecting Web application security

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8365271B2 (en) * 2008-02-27 2013-01-29 International Business Machines Corporation Controlling access of a client system to access protected remote resources supporting relative URLs
US20120278487A1 (en) * 2011-04-27 2012-11-01 Woelfel John Harold System and method of handling requests in a multi-homed reverse proxy
CN102780711A (en) * 2011-05-09 2012-11-14 腾讯科技(深圳)有限公司 Method, device and system for accessing application data of SNS (Social Network Site)
CN104954384A (en) * 2015-06-24 2015-09-30 浙江大学 Url (uniform resource locator) pseudo method for protecting Web application security

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108377274A (en) * 2018-02-09 2018-08-07 弘成科技发展有限公司 Configurable dynamic domain name processing engine based on SaaS and processing method
CN108600333A (en) * 2018-04-03 2018-09-28 广东阿里影业云智软件有限公司 A kind of data transmission method, equipment and system based on proxy server
CN108600333B (en) * 2018-04-03 2021-03-12 广东阿里影业云智软件有限公司 Data transmission method, equipment and system based on proxy server
CN110417852A (en) * 2019-06-12 2019-11-05 山谷网安科技股份有限公司 Browser-cross controls the universal method of peripheral hardware, apparatus and system
CN110413350A (en) * 2019-08-05 2019-11-05 中国林业科学研究院热带林业研究所 Request processing method, system, server and storage medium based on dynamic mapping plug-in unit
CN111460460A (en) * 2020-04-02 2020-07-28 北京金山云网络技术有限公司 Task access method, device, proxy server and machine-readable storage medium
CN111460460B (en) * 2020-04-02 2023-12-05 北京金山云网络技术有限公司 Task access method, device, proxy server and machine-readable storage medium

Also Published As

Publication number Publication date
CN107332924B (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN107332924A (en) The reverse proxy method and device replaced based on dynamic URL
CN106856434A (en) The method and apparatus of access request conversion
US9397901B2 (en) Methods, systems, and computer readable media for classifying application traffic received at a network traffic emulation device that emulates multiple application servers
CN105337990B (en) The method of calibration and device of user identity
CN105763668B (en) A kind of domain name analytic method and device
CN108055312A (en) Method for routing and its device and computer installation and its readable storage medium storing program for executing
CN105554179B (en) Dns resolution method, system in local area network
CN103581213B (en) A kind of application process of shared Hosts files, equipment and system
CN106067890B (en) A kind of domain name analytic method, apparatus and system
CN107197059B (en) DNS (Domain name Server) analysis method and device
CN108183975A (en) A kind of method and system of domain name mapping
CN109067789A (en) Web vulnerability scanning method, system based on linux system
CN103618801A (en) Method, device and system for sharing P2P (Peer-to-Peer) resources
CN108243265A (en) A kind of dns resolution processing method and processing device
CN107911499A (en) Multi-line domain name analytic method and device
CN108712428A (en) A kind of method and device carrying out device type identification to terminal
CN104969521B (en) Data sending processing method and router
CN108737407A (en) A kind of method and device for kidnapping network flow
Goel et al. A case for faster mobile web in cellular ipv6 networks
CN107223329B (en) A kind of dns resolution method, apparatus and network system
CN110753364B (en) Network monitoring method, system, electronic equipment and storage medium
CN109995885A (en) Name space structure rendering method, device, equipment and medium
CN106302661B (en) P2P data accelerated method, device and system
CN109450742A (en) Method, physical machine virtual unit and the network system of monitoring network
US10666604B2 (en) Application access method and application access system via a split domain name system

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
CB02 Change of applicant information

Address after: 100088 Building 3 332, 102, 28 Xinjiekouwai Street, Xicheng District, Beijing

Applicant after: Qianxin Technology Group Co.,Ltd.

Address before: 100015 Jiuxianqiao Chaoyang District Beijing Road No. 10, building 15, floor 17, layer 1701-26, 3

Applicant before: Beijing Qihoo Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant