CN107239475B - File calling method and device - Google Patents

File calling method and device Download PDF

Info

Publication number
CN107239475B
CN107239475B CN201610189253.7A CN201610189253A CN107239475B CN 107239475 B CN107239475 B CN 107239475B CN 201610189253 A CN201610189253 A CN 201610189253A CN 107239475 B CN107239475 B CN 107239475B
Authority
CN
China
Prior art keywords
resource file
debugged
access path
virtual server
network resource
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.)
Active
Application number
CN201610189253.7A
Other languages
Chinese (zh)
Other versions
CN107239475A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610189253.7A priority Critical patent/CN107239475B/en
Priority to TW106102210A priority patent/TWI672019B/en
Priority to PCT/CN2017/077273 priority patent/WO2017167051A1/en
Publication of CN107239475A publication Critical patent/CN107239475A/en
Application granted granted Critical
Publication of CN107239475B publication Critical patent/CN107239475B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a method and a device for calling a file, wherein when a replacing instruction for a network resource file in an http webpage is received, a virtual server is locally established according to the replacing instruction, an access path for accessing the network resource file is replaced by an access path for accessing a local resource file to be debugged through the virtual server, and then a root certificate and a sub certificate are generated for the virtual server, so that when a local browser initiates a calling request for the network resource file according to the http webpage, the virtual server receives the calling request and returns the resource file to be debugged and the sub certificate to the browser, and the browser calls and executes the resource file to be debugged according to the sub certificate. By the method, the root certificate and the sub-certificate which can provide the browser are generated for the virtual server, so that the browser can normally call the resource file to be debugged.

Description

File calling method and device
Technical Field
The present application relates to the field of information technologies, and in particular, to a method and an apparatus for calling a file.
Background
In the information-oriented society of today, networks are becoming an indispensable part of people's lives and works. When browsing a web page, a person typically establishes a communication connection with a server through a browser (or an application having a browser kernel), so that the browser can send a request for obtaining the web page to the server, and after obtaining the web page returned by the server, display the web page.
Since the web page is composed of a set of codes (e.g., composed of html5 codes), and the code of the web page pointing to various resource files (e.g., JavaScript program source files, style files of web pages, etc.) is also composed of respective codes, but the codes are manually written, so that defects or flaws may exist in any codes. Thus, before a server provides a web page to a network (i.e., before a web page is brought online), each code in the web page is typically tested in an offline environment, i.e., offline.
However, during the offline test, the server can only use the simulated online data to test the web page, which makes the result of the offline test not necessarily accurate, that is, the web page without problems is determined through the offline test, and problems may occur after the web page is online. At this time, the worker needs to debug the code of the resource file with the problem at the server side, but since the server is generally busy, the service of performing the debugging operation in the server may need to wait in a queue until there is a free thread to perform the debugging operation service, so that the time required for debugging the code of the resource file with the problem each time is long. In addition, since it is generally difficult to solve the problem in the code of the resource file by only one debugging, and a plurality of times of debugging are required, time required for solving the problem by debugging is further increased (in particular, when a resource file stored in another server is debugged, a large amount of transmission time is wasted). Based on the reasons, the staff is difficult to debug the resource files with problems in the webpage quickly and conveniently.
Therefore, in the prior art, a http proxy method is adopted for resource files to be debugged in a web page, and the resource files to be debugged are mapped to the local terminal, so that the resource files can be debugged by using real online data in the following process, wherein the http proxy method is specifically shown in fig. 1.
Fig. 1 is a method of http proxy in the prior art, which specifically includes:
s101: and determining a resource file to be debugged in the webpage, and downloading the resource file as a resource file to be debugged.
The http proxy method is expected to enable a worker to complete debugging of the resource file locally at a terminal, so that the terminal needs to determine the resource file to be debugged in a webpage at first, and then downloads the file locally to the terminal to serve as the resource file to be debugged, so that the resource file to be debugged can be debugged later.
S102: and establishing a virtual server and determining an access path for the resource file to be debugged.
The resource file to be debugged needs to be acquired through a local browser. Specifically, the browser obtains an access path of the resource file to be debugged (i.e., a domain name of the resource file to be debugged) by running a code in the web page, then initiates a request for calling the resource file to a server providing the resource file to be debugged according to the access path, and finally obtains the resource file to be debugged returned by the server.
However, since the staff wants to modify the resource file to be debugged locally, at this time, the terminal also needs to pretend to be a server to deceive the browser, and let the browser obtain the locally downloaded resource file to be debugged by running the same web page code. Therefore, the purpose of debugging the resource file to be debugged locally at the terminal is achieved.
Specifically, the terminal needs to establish a virtual server locally, and determine an access path (i.e., a virtual domain name of the resource file to be debugged) for the resource file to be debugged stored locally.
S103: and replacing the access path for accessing the original resource file with the access path for accessing the local resource file to be debugged through the virtual server.
In order to make the browser in the terminal access the resource file through the webpage code, the browser does not access the server of the resource file any more, but accesses the local virtual server. At this time, the network configuration of the terminal also needs to be modified, so that when the terminal receives a request for calling the resource file initiated by the browser, an access path for accessing the resource file is replaced with an access path for accessing the local resource file to be debugged.
When the browser sends a request for calling the resource file to a server on the network, the virtual server replaces the server on the network to receive the calling request, returns the resource file to be debugged to the server, and ensures that the browser determines that the resource file returned by the corresponding server on the network is received.
By the method described in fig. 1, the resource file to be debugged can be downloaded locally and then used as a resource file to be debugged, the resource file to be debugged is debugged locally at the terminal, and since the code in the web page is not changed, online real data can be fully utilized for debugging. Furthermore, the terminal can be only used for debugging the resource file to be debugged, so that each debugging process can be executed immediately without waiting, and the debugging efficiency is improved.
However, the process shown in fig. 1 can be implemented only for a web page whose web page is hypertext transfer protocol (http). For a webpage with a webpage being a Secure Socket Layer hypertext transfer Protocol (https), at this time, transmission between a browser and a server needs to be encrypted for communication, that is, the browser needs to verify the identity of the server by using a security certificate generated by a Secure Socket Layer Protocol (ssl) Protocol, and when receiving a resource file returned by the server, needs to verify whether the resource file carries a corresponding security certificate.
However, in the process shown in fig. 1, the virtual server does not have a security certificate, and cannot provide a security certificate, so that the browser cannot verify the identity of the virtual server, and cannot determine the security of the resource file to be debugged that is returned by the virtual server, and for the https web page, the browser cannot even call the resource file to be debugged, so that the worker cannot perform subsequent debugging work.
Therefore, in the prior art, due to the fact that no security certificate exists, proxy of the https webpage is difficult to carry out, and the resource file to be debugged cannot be called.
Disclosure of Invention
The embodiment of the application provides a method and a device for calling a file, which are used for solving the problem that a browser cannot call a resource file to be debugged due to the fact that a security certificate cannot be provided in an http proxy mode adopted by the conventional method for calling the file.
The method for calling the file provided by the embodiment of the application comprises the following steps:
receiving a replacement instruction aiming at a network resource file in the https webpage;
according to the replacement instruction, a virtual server is established locally;
replacing an access path for accessing the network resource file with an access path for accessing a local resource file to be debugged through the virtual server;
generating a root certificate for the virtual server;
and generating a sub-certificate according to the root certificate, so that when a local browser initiates a call request for the network resource file according to the https webpage, the virtual server receives the call request, and returns the resource file to be debugged and the sub-certificate to the browser according to an access path which is replaced by the access path for accessing the local resource file to be debugged, so that the browser acquires and executes the resource file to be debugged according to the sub-certificate.
An embodiment of the present application provides a call file device, including:
the receiving module is used for receiving a replacing instruction of the network resource file in the https webpage;
the execution module is used for establishing a virtual server locally according to the replacement instruction;
the replacing module is used for replacing an access path for accessing the network resource file with an access path for accessing a local resource file to be debugged through the virtual server;
a root certificate module for generating a root certificate for the virtual server;
and the sub-certificate module is used for generating a sub-certificate according to the root certificate, so that when a local browser initiates a call request for the network resource file according to the https webpage, the virtual server receives the call request, and returns the resource file to be debugged and the sub-certificate to the browser according to an access path for accessing the local resource file to be debugged instead, so that the browser acquires and executes the resource file to be debugged according to the sub-certificate.
The embodiment of the application provides a method and a device for calling a file, wherein when a replacing instruction for a network resource file in an http webpage is received, a virtual server is locally established according to the replacing instruction, an access path for accessing the network resource file is replaced by an access path for accessing a local resource file to be debugged through the virtual server, and then a root certificate and a sub-certificate are generated for the virtual server, so that when a local browser initiates a calling request for the network resource file according to the http webpage, the virtual server receives the calling request and returns the resource file to be debugged and the sub-certificate to the browser, and finally the browser can call and execute the resource file to be debugged according to the sub-certificate. By the method, the root certificate and the corresponding sub-certificate are generated for the virtual server, so that the virtual server can provide the security certificate for the browser, and the browser can normally call the resource file to be debugged.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a prior art http proxy process;
FIG. 2 is a process for calling a file according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a call file apparatus according to an embodiment of the present application.
Detailed Description
In the embodiment of the application, when a replacement instruction of a network resource in an https webpage is received, the terminal firstly establishes a virtual server locally at the terminal according to the instruction, then replaces an access path of the network resource file accessed in the terminal with an access path of a local resource file to be debugged through the virtual server, and finally generates a root certificate and a corresponding sub-certificate for the virtual server. According to the method, the virtual server can deceive the browser through a method for generating a root certificate (namely, a self-signed certificate issued by the virtual server) for the virtual server, so that the browser determines that the virtual server is a server for providing network resource files in https webpages, and can return a sub-certificate generated by the root certificate when returning local resource files to be debugged to the browser, so that the browser determines that the resource files to be debugged are safe files, and finally, the browser can call and execute the resource files to be debugged.
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 2 is a process for calling a file according to an embodiment of the present application, which specifically includes the following steps:
s201: a replacement instruction for a network resource file in an https web page is received.
Since the network resource file in the https webpage needs to be debugged locally at the terminal, before debugging starts, the local resource file to be debugged needs to be replaced with the network resource file in the https webpage. However, since the resource file to be debugged has not yet been debugged, the current resource file to be debugged may be any file, and may be a file that only possesses a file identifier and an address but does not have corresponding content (i.e., is a blank file), and does not prevent the resource file to be debugged from being called subsequently.
Thus, in the embodiment of the present application, the terminal may receive a replacement instruction for the network resource file in the https webpage.
Specifically, the replacing instruction may be a line of command lines, which is used for enabling the terminal to determine the network resource file that needs to be replaced and the resource file to be debugged that is pre-stored locally. Wherein the replacement instruction comprises: the identification of the network resource file, the access path of the network resource file, the identification of the resource file to be debugged which is pre-stored locally and the address of the resource file to be debugged.
It should be noted that the terminal may be a Personal Computer (PC), a mobile phone, a tablet computer, and the like, and the network Resource file may be a java script language (JavaScript, JS) program source file running on a browser, a Cascading Style sheet (css) file, and the like, which may be provided by a server through a Uniform Resource Locator (URL).
For example, suppose that a music play button in the https webpage a returns a JS program source file (hereinafter, referred to as an audio JS file) for calling a local player application to play an audio file to the browser after being clicked, so that the https webpage a plays a specified audio file through the local player application, but after a worker operates the https webpage a online, the worker finds that the https webpage a does not play the audio file after clicking the music play button, and thus the worker needs to perform a JS program source file on his PC for the https webpage a that has a problem.
Assume further that the PC receives a replacement instruction for the audio JS file (i.e., the network resource file) in the https web page a, and that the replacement instruction includes an identification of the audio JS file: JS, access path of the audio JS file: https:// www.XX.com/XX/a.js, and the identifier of the resource file to be debugged, which is locally and pre-stored by the PC: js and the address of the resource file to be debugged: e \ debugging work \ file to be debugged \ b.
S202: and establishing a virtual server locally according to the replacement instruction.
In the embodiment of the present application, the calling process of the network resource file under normal conditions is: the browser in the terminal determines an access path of a network resource file to be called first by running a code of the https webpage, then initiates a request for calling the network resource file to a server storing the network resource file (i.e., initiates a calling request according to the access path of the network resource file), and finally receives the network resource file returned by the server and a sub-certificate provided by the server, and completes calling of the network resource file.
However, in the present application, since it is necessary for the browser to call the local resource file to be debugged (so that debugging can be performed locally at the terminal in the following), an access path that can be accessed by the browser needs to be provided for the resource file to be debugged. Therefore, in the application, the terminal needs to be disguised as a virtual server storing the resource file to be debugged, and the domain name of the virtual server is determined, so that the browser can access the virtual server through the domain name of the virtual server, so as to generate an access path for the resource file to be debugged subsequently.
Specifically, the process of establishing the virtual server locally at the terminal is consistent with the prior art, and by establishing the virtual server and determining the domain name of the virtual server, the browser in the terminal can access the virtual server locally established at the terminal through the domain name of the virtual server, so that a foundation is established for the browser to call the resource file to be debugged stored locally.
Continuing with the above example, assume that the PC has established a virtual server α on the PC after receiving the replacement command, and determines that its domain name is: https:// www.YY.com.
S203: and replacing the access path for accessing the network resource file with the access path for accessing the local resource file to be debugged through the virtual server.
In the embodiment of the application, after the virtual server is established, an access path can be generated for the resource file to be debugged, so that the browser can call the resource file to be debugged according to the access path of the resource file to be debugged. However, at this time, the browser still accesses the path of the network resource file according to the web page code of the https web page, so the access path for accessing the network resource file also needs to be replaced with the access path for accessing the resource file to be debugged.
Specifically, an access path of the file to be debugged (that is, the virtual domain name of the resource file to be debugged) is first generated according to the domain name of the virtual server and the address of the file to be debugged, and then the resource file to be debugged may be considered to be the file stored in the virtual server at this time.
Secondly, modifying the network configuration of the terminal, and replacing the access path for accessing the network resource file with the access path for accessing the resource file to be debugged. When the terminal receives an access, call or query request which is sent by the browser and is based on the access path of the network resource file, the virtual server receives the access, call or query request according to the alternative relation of the access path, and the destination of the access, call or query request is pointed to the access path of the resource file to be debugged.
In addition, in order to furthest utilize online real data to run the https webpage in a subsequent debugging process and ensure the reliability of a debugging result, in the application, only an access path for the network resource file is modified to be an access path for the resource file to be debugged, and an access path for other resource files sent by the browser is not modified, so that when the browser calls other resource files on the https webpage, an access path determined according to the https webpage is not changed, and the browser is finally called or other resource files on the network, and when the browser calls the network resource files, the access path determined by the browser is replaced by the resource file to be debugged which points to the local terminal, and the browser calls the resource file to be debugged which is locally stored. And in the subsequent debugging process, the browser can use the real data on the line to the maximum extent, so that the staff only debugs the debugging resource file.
It should be noted that, the method for generating an access path for the resource to be debugged is the same as the prior art, and an access path based on the domain name of the virtual server can be arbitrarily generated for the resource file to be debugged, and the corresponding relationship between the access path and the address of the resource file to be debugged is recorded, so that the virtual server can determine the resource file to be debugged according to the access path.
Continuing to use the above example, assuming that the PC generates an access path of the resource file b.js to be debugged through the domain name https:// www.YY.com of the virtual server α and the address E: \ debugging work \ file to be debugged \ b.js of the resource file b.js to be debugged: https:// www.YY.com/b.js. And the PC also replaces the access path https:// www.XX.com/XX/a.js in the network configuration with https:// www.YY.com/b.js. When the PC receives a call request of an audio JS file aiming at the https webpage A sent by a terminal browser B, the virtual server alpha receives the call request according to the modified access path in the network configuration, and calls the resource file b.js to be debugged according to the access path https:// www.YY.com/b.js.
S204: generating a root certificate for the virtual server.
In the embodiment of the present application, it is stated in step S101 that the present application is based on an https web page, and for the https web page, communication encryption is required for the transmission between the browser and the virtual server, so in order to enable the virtual server to encrypt communication with the transmission between the browser, a root certificate needs to be generated for the virtual server.
Specifically, since the root Certificate is only used in the terminal as the security Certificate of the virtual server, an authoritative security Certificate with high public trust (e.g., a CA Certificate issued by a Certificate Authority) is not needed, and only the browser needs to be deceived, so that the browser can communicate with the transmission of the virtual server device for encryption.
It should be noted that the root certificate is various types of security certificates, such as a domain name SSL (DVSSL) certificate, an enterprise SSL (OVSSL) certificate, an enhanced SSL (Extended validity SSL) certificate, and a wildcard SSL (wildcard SSL) certificate, which is not specifically limited in this application.
Continuing with the above example, assume that a root certificate β is generated for the virtual server α.
S205: and generating a sub-certificate according to the root certificate.
In this embodiment, after generating the root certificate for the virtual server (i.e., after issuing the self-signed certificate for the virtual server), in order to enable the browser to call the resource file to be debugged that is locally stored in the terminal, the virtual server may further generate a sub-certificate for sending to the browser according to the root certificate, so that the browser may determine that the resource file to be debugged is secure according to the sub-certificate. After the root certificate and the sub-certificate thereof are generated, the browser can be in communication connection with the virtual server based on the https webpage.
Specifically, consistent with the prior art, the virtual server generates a sub-certificate for sending to the browser based on the root certificate, so that when the browser in the terminal initiates a call request for the network resource file according to the https webpage, the virtual server receives the call request, returns the resource file to be debugged and the sub-certificate to the browser according to an access path for replacing the access path with the local resource file to be debugged, and further enables the browser to determine that the resource file to be debugged is safe according to the sub-certificate and acquire and execute the resource file to be debugged.
Continuing with the above example, assuming that the virtual server generates the sub-certificate γ according to the root certificate β, when the browser B initiates a call request to https:// www.XX.com/XX/a.js according to the https web page a, the virtual server α receives the call request initiated to https:// www.YY.com/b.js, and the virtual server α returns the resource file to be debugged b.js and the sub-certificate γ to the browser, so that after receiving the resource file to be debugged b.js and the sub-certificate γ, the browser B determines that the resource file to be debugged b.js is safely available according to the sub-certificate γ, and acquires and executes the resource file to be debugged b.js.
Through the file calling method shown in fig. 2, it can be seen that, since the root certificate and the sub certificate are generated for the virtual server, even if a browser calls a network resource file initiated according to an https webpage, the virtual server can deceive the browser through the root certificate, so that the browser determines that the virtual server is a server providing the network resource file in the https webpage, and the virtual service returns the resource file to be debugged and the sub certificate to the browser, so that the resource file to be debugged can deceive the browser through the sub certificate, and the browser determines that the identity of the resource file to be debugged is secure. Therefore, the network resource files in the https webpage are replaced, and the browser can acquire and execute the local resource files to be debugged. And the staff can debug the network resource file in the https webpage with problems at the local terminal.
In addition, as described in step S201, the resource file to be debugged may be any file, and thus, in order to debug the resource file to be debugged later, the network resource file may also be downloaded to the address of the resource file to be debugged in the present application.
Specifically, the terminal may determine an access path of the network resource file according to the replacement instruction, and download the network resource file to the address of the resource file to be debugged according to the access path of the network resource file, so that the resource file to be debugged is not any file at this time, but has been replaced with the downloaded network resource file, and then a subsequent worker may debug the resource file to be debugged locally.
It should be noted that the downloading of the network resource file and the replacement of the resource file to be debugged may be performed in any step in the present application, and it is only necessary to ensure that the access path of the resource file to be debugged generated in step S203 is the access path of the resource file to be debugged that has been replaced by the network resource file.
Based on the process of calling a file as shown in fig. 2, an embodiment of the present application further provides a device for calling a file, as shown in fig. 3.
Fig. 3 is a schematic structural diagram of a file calling device according to an embodiment of the present application, which specifically includes:
the receiving module 301 is configured to receive a replacement instruction of a network resource file in an https webpage;
an execution module 302, configured to establish a virtual server locally according to the replacement instruction;
a replacing module 303, configured to replace, by the virtual server, an access path for accessing the network resource file with an access path for accessing a local resource file to be debugged;
a root certificate module 304, configured to generate a root certificate for the virtual server;
and a sub-certificate module 305, configured to generate a sub-certificate according to the root certificate, so that when a local browser initiates a call request for the network resource file according to the https web page, the virtual server receives the call request, and returns the resource file to be debugged and the sub-certificate to the browser according to an access path that is replaced by an access path for accessing a local resource file to be debugged, so that the browser obtains and executes the resource file to be debugged according to the sub-certificate.
The replacement instruction includes: the identification of the network resource file, the access path of the network resource file, the identification of the resource file to be debugged which is pre-stored locally and the address of the resource file to be debugged.
The execution module 302 is specifically configured to locally establish a virtual server according to the replacement request, and determine a domain name of the virtual server.
The replacing module 303 is specifically configured to generate an access path of the resource to be debugged according to the domain name of the virtual server and the address of the resource file to be debugged, and replace the access path for accessing the network resource file with an access path for accessing a local resource file to be debugged.
The device further comprises:
the downloading module 306 is configured to download the network resource file to the address of the resource file to be debugged.
Specifically, the database statement compiling apparatus shown in fig. 3 may be located in a terminal, where the terminal may be a mobile phone, a tablet computer, or a PC.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (6)

1. A method for calling a file, the method comprising:
receiving a replacement instruction aiming at a network resource file in a secure socket layer hypertext transfer protocol https webpage, wherein the replacement instruction comprises an access path of the network resource file to be replaced and an address of a resource file to be debugged, which is stored locally in advance; downloading the network resource file to the address of the resource file to be debugged according to the access path of the network resource file, and replacing the resource file to be debugged with the network resource file;
according to the replacement instruction, a virtual server is established locally; determining a domain name of the virtual server, so that a browser accesses the virtual server through the domain name;
generating an access path for the resource file to be debugged through the virtual server, and replacing the access path for accessing the network resource file with the access path for accessing the resource file to be debugged;
generating a root certificate for the virtual server;
and generating a sub-certificate according to the root certificate, so that when a local browser initiates a call request for the network resource file according to the https webpage, the virtual server receives the call request, and returns the replaced network resource file and the sub-certificate to the browser according to an access path for accessing the resource file to be debugged, so that the browser acquires and executes the network resource file according to the sub-certificate.
2. The method of claim 1, wherein the replacement instruction further comprises: the identifier of the network resource file and the identifier of the resource file to be debugged, which is pre-stored locally.
3. The method of claim 1, wherein an access path is generated for the resource file to be debugged through the virtual server; replacing the access path for accessing the network resource file with the access path for accessing the resource file to be debugged, which specifically includes:
generating an access path of the resource to be debugged according to the domain name of the virtual server and the address of the resource file to be debugged;
and replacing the access path for accessing the network resource file with the access path for accessing the resource file to be debugged.
4. An apparatus for calling a file, comprising:
the system comprises a receiving module, a debugging module and a debugging module, wherein the receiving module is used for receiving a replacing instruction of a network resource file in a secure socket layer hypertext transfer protocol https webpage, and the replacing instruction comprises an access path of the network resource file to be replaced and an address of a resource file to be debugged which is stored in the local in advance; downloading the network resource file to the address of the resource file to be debugged according to the access path of the network resource file, and replacing the resource file to be debugged with the network resource file;
the execution module is used for establishing a virtual server locally according to the replacement instruction; determining a domain name of the virtual server, so that a browser accesses the virtual server through the domain name;
the replacing module is used for generating an access path for the resource file to be debugged through the virtual server and replacing the access path for accessing the network resource file with the access path for accessing the resource file to be debugged;
a root certificate module for generating a root certificate for the virtual server;
and the sub-certificate module is used for generating a sub-certificate according to the root certificate, so that when a local browser initiates a call request for the network resource file according to the https webpage, the virtual server receives the call request, and returns the replaced network resource file and the sub-certificate to the browser according to an access path for accessing the resource file to be debugged, so that the browser acquires and executes the network resource file according to the sub-certificate.
5. The apparatus of claim 4, wherein the replacement instruction further comprises: the identifier of the network resource file and the identifier of the resource file to be debugged, which is pre-stored locally.
6. The apparatus according to claim 4, wherein the replacing module is specifically configured to generate an access path of the resource to be debugged according to the domain name of the virtual server and the address of the resource file to be debugged, and replace the access path for accessing the network resource file with the access path for accessing the resource file to be debugged.
CN201610189253.7A 2016-03-29 2016-03-29 File calling method and device Active CN107239475B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201610189253.7A CN107239475B (en) 2016-03-29 2016-03-29 File calling method and device
TW106102210A TWI672019B (en) 2016-03-29 2017-01-20 Method and device for calling a file
PCT/CN2017/077273 WO2017167051A1 (en) 2016-03-29 2017-03-20 File calling method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610189253.7A CN107239475B (en) 2016-03-29 2016-03-29 File calling method and device

Publications (2)

Publication Number Publication Date
CN107239475A CN107239475A (en) 2017-10-10
CN107239475B true CN107239475B (en) 2020-09-18

Family

ID=59963470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610189253.7A Active CN107239475B (en) 2016-03-29 2016-03-29 File calling method and device

Country Status (3)

Country Link
CN (1) CN107239475B (en)
TW (1) TWI672019B (en)
WO (1) WO2017167051A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110768940B (en) * 2018-07-27 2022-03-22 深信服科技股份有限公司 Ciphertext data management and control method and system based on HTTPS (Hypertext transfer protocol secure) protocol, proxy server and storage medium
CN109508437B (en) * 2018-11-21 2021-05-04 深信服科技股份有限公司 Search website auditing method, system, gateway equipment and storage medium
CN113507529B (en) * 2021-07-26 2022-12-06 上海中通吉网络技术有限公司 Method for realizing file downloading based on Web application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214224A (en) * 2011-06-15 2011-10-12 中兴通讯股份有限公司 Network resource access optimizing method, Web page browser and terminal
CN102916958A (en) * 2012-10-15 2013-02-06 福建榕基软件股份有限公司 Method and system for realizing access encryption of mobile terminal browser
CN104539682A (en) * 2014-12-19 2015-04-22 乐视网信息技术(北京)股份有限公司 Debug method, device, mobile terminal, server and system for mobile webpage
CN105404504A (en) * 2015-11-02 2016-03-16 北京锐安科技有限公司 Debugging method and device of Web assembly

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509490B1 (en) * 2000-05-26 2009-03-24 Symantec Corporation Method and apparatus for encrypted communications to a secure server
US7370351B1 (en) * 2001-03-22 2008-05-06 Novell, Inc. Cross domain authentication and security services using proxies for HTTP access
US8386785B2 (en) * 2008-06-18 2013-02-26 Igt Gaming machine certificate creation and management
CN103065078A (en) * 2013-01-04 2013-04-24 无锡矽鼎科技有限公司 Method of loading client certificate for Android system by OpenSSL engine
JP6007149B2 (en) * 2013-05-24 2016-10-12 日本電信電話株式会社 Web browsing history acquisition apparatus, method, and program
US9560038B2 (en) * 2014-06-20 2017-01-31 Adobe Systems Incorporated Method and apparatus for verifying an application to authorize content repository access using SSL certificates

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214224A (en) * 2011-06-15 2011-10-12 中兴通讯股份有限公司 Network resource access optimizing method, Web page browser and terminal
CN102916958A (en) * 2012-10-15 2013-02-06 福建榕基软件股份有限公司 Method and system for realizing access encryption of mobile terminal browser
CN104539682A (en) * 2014-12-19 2015-04-22 乐视网信息技术(北京)股份有限公司 Debug method, device, mobile terminal, server and system for mobile webpage
CN105404504A (en) * 2015-11-02 2016-03-16 北京锐安科技有限公司 Debugging method and device of Web assembly

Also Published As

Publication number Publication date
TWI672019B (en) 2019-09-11
WO2017167051A1 (en) 2017-10-05
TW201735583A (en) 2017-10-01
CN107239475A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
TWI687113B (en) Method and server for determining whether the terminal logging in to the website is a mobile terminal
CN106897053B (en) Code publishing method and device
CN105592011B (en) Account login method and device
JP6931608B2 (en) Two-dimensional code scan interaction method, system and non-temporary computer readable medium
US10565090B1 (en) Proxy for debugging transformed code
CN109299015B (en) Software testing method, device and system
CN107733882B (en) SSL certificate automatic deployment method and equipment
CN112532490A (en) Regression testing system and method and electronic equipment
CN108449187B (en) Token refreshing method and device
CN111355720B (en) Method, system and equipment for accessing intranet by application and computer storage medium
US10803166B1 (en) Automated determination of application privileges
CN105260292A (en) Log recording method, apparatus and system
CN107147645B (en) Method and device for acquiring network security data
CN110968760A (en) Webpage data crawling method and device, and webpage login method and device
CN107239475B (en) File calling method and device
CN108255708A (en) Method, apparatus, storage medium and the equipment of production file are accessed in test environment
CN110968560A (en) Log collector configuration method, device and system
US9665732B2 (en) Secure Download from internet marketplace
CN110928571A (en) Business program development method and device
US9558060B1 (en) End use self-help delivery system
TWI677223B (en) Page display method and device
CN107276998B (en) OpenSSL-based performance optimization method and device
CN110321507B (en) Browser cross-domain communication method and device
CN109145209B (en) Method, apparatus and storage medium for searching blockchain data
CN109542401B (en) Web development method and device, storage medium and processor

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.