A method and system for parsing curl command proxy interface
By parsing the curl command and automatically generating an interface proxy, the problems of complex manual operations and high error rates in the interface gateway are solved, and an efficient and secure interface proxy is achieved.
Patent Information
- Application Number
- CN202411720774.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the existing technology, manual configuration and page registration methods in the interface gateway have the problems of complex operation, high technical requirements and easy occurrence of human errors, which lead to interface proxy failure and operation and maintenance problems.
By parsing the curl command, it automatically parses the curl command copied by the user, splits it into multiple instructions and extracts information such as interface address, request method, parameters, etc. to form a proxy interface to avoid manual input errors.
It improves the efficiency and usability of interface agents, ensures data accuracy and system security, supports users to confirm and correct operations, and reduces human errors.
Smart Images

Figure CN119676332B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of interface gateways, in particular to a method and system for parsing a curl command proxy interface. Background Art
[0002] With the development of internet technology and the prevalence of microservices, an increasing number of services need to be exposed. The need to manage these services has led to the emergence of interface gateways. The term "gateway" first appeared in network devices. For example, when two independent local area networks communicate through a router, the intermediate routing device is called a gateway. At the software development level, a gateway exists between the client and the microservice system. From a business perspective, when a client completes a task, it needs to call multiple microservices simultaneously. From a system perspective, any application system that needs to be called by other systems needs to expose interfaces. These interfaces represent business functions.
[0003] Registering an interface with the interface gateway is a crucial step in using the gateway. Traditional methods typically involve manual configuration or web-based registration. Manual configuration is limited to interface proxies at the application system level and requires high technical skills, restricting it to operations and development personnel. This limits the use of the interface gateway. Compared to manual configuration, web-based registration is simpler, has a lower technical barrier to entry, and is more convenient. However, traditional web-based registration requires users to manually enter various information, including but not limited to the interface address, request method, and request parameters. Inevitable errors in manual operation can easily lead to proxy failures, resulting in more operational issues. Summary of the Invention
[0004] In response to the needs and shortcomings of current technological development, the present invention provides a method and system for parsing a proxy interface by parsing curl commands. The curl commands are parsed automatically to assist users in proxying the interface, avoid errors caused by manual input, and improve the efficiency of the interface proxy and the usability of the proxy interface.
[0005] In a first aspect, the present invention provides a method for parsing a curl command proxy interface, and the technical solution adopted to solve the above technical problems is as follows:
[0006] A method for parsing a curl command proxy interface, comprising the following steps:
[0007] S1. The user calls the interface in a third-party tool by referring to the interface documentation. When the interface call is successful, copy the generated curl command and paste it into the front-end page.
[0008] S2. The front-end page verifies the curl command;
[0009] S3. The front-end page transmits the verified curl command to the back-end for processing. After receiving the curl command, the back-end splits the curl command into several instructions and stores them in an array. Each instruction is an option or an option parameter.
[0010] S4. Refer to the curl documentation. The backend executes each instruction in the array in sequence and extracts five types of options, including the interface address, request method, parameter list, parameter position, and request body type, and their corresponding option parameters.
[0011] S5. The backend processes the extracted interface address and saves it into a parameter list;
[0012] S6. The backend transmits the information extracted in step S4 to the frontend page for display;
[0013] S7. The user confirms the modification of the display information of the front-end page and saves it to the database. The back-end forms a proxy interface based on the saved information in the database, thereby realizing the gateway proxy function.
[0014] Optionally, step S2 is performed, and the front-end page verifies the curl command, specifically including:
[0015] Check whether the curl command contains special characters that affect command security or command parsing;
[0016] Check whether the length of the curl command exceeds the preset length range;
[0017] Use a regular expression to verify that the curl command contains required information.
[0018] Optionally, execute step S3. After the backend receives the curl command:
[0019] (1) Check whether the curl command is legal and whether it contains malicious commands or scripts, and execute subsequent steps after passing the test;
[0020] (2) Use a regular expression to verify whether the format of the curl command is legal. If the verification is legal, execute the subsequent steps. The verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal.
[0021] (3) Normalize the curl command: remove the leading and trailing spaces, and remove useless command symbols;
[0022] (4) Remove the first "curl" character to perform segmentation processing;
[0023] (5) Split the curl command into several instructions according to spaces and store them in an array. Each instruction is an option or an option parameter.
[0024] Optionally, step S5 is executed, and the backend processes the extracted interface address as follows:
[0025] Determine whether there is a protocol number. If not, add "http: / / " in front.
[0026] Determine whether there is a "?", if so, cut off the part after the question mark;
[0027] Split the intercepted part into multiple key-value pairs using "&", each key-value pair is a string;
[0028] Traverse multiple key-value pairs, and then intercept each key-value pair into parameter name and parameter value according to "=";
[0029] Save the results to the parameter list.
[0030] Optionally, after executing step S6, the information displayed on the front-end page is as follows: request address, request method, request body type, request parameter list, cookie, interface address IP protocol, interface address http protocol version number, maximum transmission time, proxy address, proxy username and password, whether files are included, user-agent settings, where the cookie information is extracted from the response header returned by the server during the execution of the curl command, and the user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command.
[0031] In a second aspect, the present invention provides a system for parsing a curl command proxy interface, and the technical solution adopted to solve the above technical problems is as follows:
[0032] A system for proxying an interface by parsing curl commands, comprising a front-end part and a back-end part;
[0033] The front-end part includes:
[0034] Call the copy module, which allows users to call the interface in a third-party tool by referring to the interface documentation. When the interface call is successful, the generated curl command is copied and pasted into the verification transmission module.
[0035] The verification and transmission module supports verification of pasted curl commands and transmits the verified curl commands to the backend;
[0036] The visual editing module supports displaying the transmission information of the backend part for users to view and modify;
[0037] The transmission and saving module supports transmitting the display information modified and confirmed by the user to the database for storage;
[0038] The backend part includes:
[0039] The receiving and splitting module supports receiving the curl command sent by the verification and transmission module, and splits it into several instructions and stores them in an array. Each instruction is an option or an option parameter.
[0040] The execution extraction module supports referring to the curl usage documentation, executing each instruction in the array in sequence, and extracting five types of options and corresponding option parameters: interface address, request method, parameter list, parameter position, and request body type;
[0041] The address processing module supports processing the extracted interface addresses and saving them into the parameter list;
[0042] The information transmission module supports transmitting the information extracted by the extraction module to the visual editing module;
[0043] The proxy implementation module supports the formation of proxy interface based on the saved information in the database to realize the gateway proxy function.
[0044] Optionally, the verification transmission module verifies the pasted curl command, specifically including:
[0045] Check whether the curl command contains special characters that affect command security or command parsing;
[0046] Check whether the length of the curl command exceeds the preset length range;
[0047] Use a regular expression to verify that the curl command contains required information.
[0048] Optionally, the receiving and splitting module receives the curl command sent by the verification and transmission module and first performs the following operations:
[0049] (1) Check whether the curl command is legal and whether it contains malicious commands or scripts, and execute subsequent steps after passing the test;
[0050] (2) Use regular expressions to check whether the format of the curl command is legal. If the verification is legal, execute the subsequent steps. The verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal.
[0051] (3) Normalize the curl command: remove the leading and trailing spaces, and remove useless command symbols;
[0052] (4) Remove the first "curl" character to perform segmentation processing;
[0053] Then the curl command is split into several instructions according to spaces and stored in an array. Each instruction is an option or option parameter.
[0054] Optionally, the address processing module performs the following processing on the extracted interface address:
[0055] Determine whether there is a protocol number. If not, add "http: / / " in front.
[0056] Determine whether there is a "?", if so, cut off the part after the question mark;
[0057] Split the intercepted part into multiple key-value pairs using "&", each key-value pair is a string;
[0058] Traverse multiple key-value pairs, and then intercept each key-value pair into parameter name and parameter value according to "=";
[0059] Save the results to the parameter list.
[0060] Optionally, the visual editing module involved specifically displays the following information for users to view and modify: request address, request method, request body type, request parameter list, cookie, interface address IP protocol, interface address http protocol version number, maximum transmission time, proxy address, proxy user name and password, whether to include files, user-agent settings, among which, cookie information is extracted from the response header returned by the server during the execution of the curl command, and the user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command.
[0061] The method and system of the present invention for parsing a curl command proxy interface have the following beneficial effects compared with the prior art:
[0062] 1. The present invention eliminates the need for manual registration of gateway interfaces. Users only need to enter the curl command to parse the curl command and generate a proxy interface, thus avoiding errors caused by manual input and improving the efficiency of the interface proxy and the usability of the proxy interface.
[0063] 2. The present invention parses the curl command through front-end verification, back-end verification, command parsing, and address parsing, ensuring both system security and data accuracy. The present invention also supports confirmation and error correction operations, allowing users to view and confirm and input corrections when parsing failures or command errors occur. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] AttachmentFigure 1 is a flow chart of a method according to embodiment 1 of the present invention;
[0065] Attachment Figure 2 This is a module connection block diagram of the second embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the technical solution, the technical problems solved and the technical effects of the present invention more clear, the technical solution of the present invention is clearly and completely described below in conjunction with specific embodiments.
[0067] Example 1:
[0068] Combined with attachment Figure 1 This embodiment proposes a method for parsing a curl command proxy interface, which includes the following steps:
[0069] S1. Refer to the interface documentation and use a third-party tool (such as Postman) to call the interface according to the specified parameter requirements and calling specifications. When the interface call is successful, copy the generated curl command and paste it into the front-end page. This page can also be filled with relevant business information, such as the interface name, interface description, and proxy context.
[0070] S2. The front-end page verifies the curl command, specifically including:
[0071] Check whether the curl command contains special characters that affect command security or command parsing, such as &|. Before using it, enumerate the complete special character set according to the actual system security policy.
[0072] Check whether the curl command length exceeds the preset length range. The specific length range can be adjusted according to the actual system load capacity and business needs;
[0073] Use a regular expression to verify that the curl command contains required information.
[0074] S3. The front-end page transmits the verified curl command to the back-end for processing;
[0075] After receiving the curl command, the backend first performs the following operations:
[0076] (1) Detect whether the curl command is legal, for example, ① check whether the curl command length meets the system preset maximum length limit (such as 1000 bytes, depending on the system configuration), ② check whether the encoding uses the UTF-8 encoding format supported by the system, ③ for the legitimacy of the characters, in addition to the special characters previously verified, it is also necessary to check whether there are unrecognizable control characters, etc. (refer to the control character range definition of the ASCII code table); detect whether the curl command contains malicious commands or scripts. This process can integrate open source security detection libraries (such as ClamAV, etc.), regularly update the virus feature library, and check whether malicious scripts or commands are hidden in the curl command based on feature matching;
[0077] (2) Use a regular expression to verify whether the format of the curl command is legal. If the verification is legal, execute the subsequent steps. The verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal.
[0078] (3) Normalize the curl command: remove the leading and trailing spaces, and remove useless command symbols;
[0079] (4) Remove the first "curl" character to perform segmentation processing;
[0080] Then, the curl command is split into several instructions according to spaces and stored in an array, each instruction is an option or option parameter.
[0081] S4. Refer to the curl documentation. The backend executes each instruction in the array in sequence and extracts five types of options and corresponding option parameters: interface address, request method, parameter list, parameter position, and request body type.
[0082] It should be added that in the process of executing each instruction in the array, if an execution error is encountered due to non-compliance with the curl standard syntax format, an error log should be recorded, detailing the content of the erroneous instruction and the error type (such as syntax error, missing parameter error, etc.), and an error prompt message should be returned to the front end to inform the user that there is a problem with the instruction execution and that the curl command needs to be rechecked and corrected; when extracting various options and parameters, if the format does not meet expectations (such as parameter values lacking quotation marks, etc.), it should be processed according to the preset fault tolerance and correction rules (specific fault tolerance and correction methods can be illustrated with examples, such as simple correction operations such as automatically filling in missing quotation marks) to ensure that the required information can be extracted as accurately as possible.
[0083] S5. The backend processes the extracted interface address and saves it into a parameter list. The interface address processing process is as follows:
[0084] Determine whether there is a protocol number. If not, add "http: / / " in front.
[0085] Determine whether there is a "?", if so, cut off the part after the question mark;
[0086] Split the intercepted part into multiple key-value pairs using "&", each key-value pair is a string;
[0087] Traverse multiple key-value pairs, and then intercept each key-value pair into parameter name and parameter value according to "=";
[0088] Save the results to the parameter list.
[0089] It should be noted that before performing the above processing on the interface address, the interface address is first verified to ensure that it conforms to basic URL format specifications using regular expressions or other methods (specific regular expression examples can be provided, such as matching common URL formats such as ^(https?|ftp): / / [^\s / $.?#].[^\s]*$). If it does not conform to the format specifications, an error message is recorded and returned to the front-end to prompt the user that the interface address format is incorrect and needs to be re-entered or corrected. Subsequently, if an abnormality is encountered during the processing, such as the absence of the '?' or the failure of the key-value pair format after the '&' segmentation, the error is also recorded and fed back to the front-end for appropriate processing.
[0090] S6. The backend transmits the information extracted in step S4 to the frontend page for display.
[0091] The displayed content includes: request address (address), request method (method), request body type (content-type), request parameter list (header, body, params), cookie, interface address IP protocol (ipProtocol), interface address HTTP protocol version (httpVersion), maximum transmission time (maxSocketTime), proxy address (proxyUrl), proxy username and password (proxyUser, proxyPassword), whether a file is included (file), and user-agent setting (header.user-agent). Cookie information is extracted from the response header returned by the server during the curl command execution (specifically, the relevant cookie value can be obtained by parsing the 'Set-Cookie' field in the response header). The user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command (if the option exists). If not, the default system user-agent value is displayed (such as 'Mozilla / 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit / 5.0 (KHTML, like Gecko)Chrome / XX.XX.XXSafari / 5.0', the specific default value depends on the system configuration).
[0092] S7. The user confirms the modification of the display information of the front-end page and saves it to the database. The back-end forms a proxy interface based on the saved information in the database, thereby realizing the gateway proxy function.
[0093] Example 2:
[0094] Combined with attachment Figure 2 This embodiment proposes a system for parsing a curl command proxy interface, which includes a front-end part and a back-end part.
[0095] (1) The front end part includes:
[0096] Call the copy module, which allows users to call the interface in a third-party tool by referring to the interface documentation. When the interface call is successful, the generated curl command is copied and pasted into the verification transmission module.
[0097] The verification and transmission module supports verification of pasted curl commands and transmits the verified curl commands to the backend;
[0098] The visual editing module supports displaying the transmission information of the backend part for users to view and modify;
[0099] The transmission and saving module supports transmitting the display information modified and confirmed by the user to the database for storage.
[0100] In this embodiment, the verification transmission module verifies the pasted curl command, specifically including:
[0101] Check whether the curl command contains special characters that affect command security or command parsing;
[0102] Check whether the length of the curl command exceeds the preset length range;
[0103] Use a regular expression to verify that the curl command contains required information.
[0104] In this embodiment, the receiving and splitting module receives the curl command transmitted by the verification and transmission module and first performs the following operations:
[0105] (1) Check whether the curl command is legal, for example, ① check whether the curl command length meets the system preset maximum length limit (such as 1000 bytes, depending on the system configuration), ② check whether the encoding uses the UTF-8 encoding format supported by the system, ③ for character legitimacy, in addition to the special characters previously checked, it is also necessary to check whether there are unrecognizable control characters (refer to the control character range definition in the ASCII code table);
[0106] Detect whether the curl command contains malicious commands or scripts. This process can integrate open source security detection libraries (such as ClamAV, etc.), regularly update the virus signature library, and use signature matching to check whether malicious scripts or commands are hidden in the curl command;
[0107] Execute subsequent steps after passing the test;
[0108] (2) Use regular expressions to check whether the format of the curl command is legal. If the verification is legal, execute the subsequent steps. The verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal.
[0109] (3) Normalize the curl command: remove the leading and trailing spaces, and remove useless command symbols;
[0110] (4) Remove the first "curl" character to perform segmentation processing;
[0111] Then the curl command is split into several instructions according to spaces and stored in an array. Each instruction is an option or option parameter.
[0112] (2) The back-end part includes:
[0113] The receiving and splitting module supports receiving the curl command sent by the verification and transmission module, and splits it into several instructions and stores them in an array. Each instruction is an option or an option parameter.
[0114] The execution extraction module supports referring to the curl usage documentation, executing each instruction in the array in sequence, and extracting five types of options and corresponding option parameters: interface address, request method, parameter list, parameter position, and request body type;
[0115] The address processing module supports processing the extracted interface addresses and saving them into the parameter list;
[0116] The information transmission module supports transmitting the information extracted by the extraction module to the visual editing module;
[0117] The proxy implementation module supports the formation of proxy interface based on the saved information in the database to realize the gateway proxy function.
[0118] This embodiment executes each instruction in the execution extraction module array, extracts five types of options and corresponding option parameters: interface address, request method, parameter list, parameter position and request body type. What needs to be supplemented in this process is that in the process of executing each instruction in the array, if an execution error occurs due to non-compliance with the curl standard syntax format, an error log should be recorded, recording the erroneous instruction content and error type (such as syntax error, parameter missing error, etc.) in detail, and an error prompt message should be returned to the front end to inform the user that there is a problem with the instruction execution and the curl command needs to be rechecked and corrected; when extracting various options and parameters, if the format does not meet expectations (such as the parameter value lacks quotation marks, etc.), it is processed according to the preset fault tolerance and correction rules (specific fault tolerance and correction methods can be illustrated by examples, such as simple correction operations such as automatically filling in missing quotation marks) to ensure that the required information can be extracted as accurately as possible.
[0119] In this embodiment, the address processing module performs the following processing on the extracted interface address:
[0120] Determine whether there is a protocol number. If not, add "http: / / " in front.
[0121] Determine whether there is a "?", if so, cut off the part after the question mark;
[0122] Split the intercepted part into multiple key-value pairs using "&", each key-value pair is a string;
[0123] Traverse multiple key-value pairs, and then intercept each key-value pair into parameter name and parameter value according to "=";
[0124] Save the results to the parameter list.
[0125] It should be noted that before the address processing module performs the above processing on the interface address, it should first verify whether the interface address conforms to the basic URL format specifications through regular expressions or other methods (specific regular expression examples can be given, such as matching common URL formats such as ^(https?|ftp): / / [^\s / $.?#].[^\s]*$). If it does not conform to the format specifications, an error message will be recorded and returned to the front-end to prompt the user that the interface address format is incorrect and needs to be re-entered or corrected. Subsequently, if an abnormal situation is encountered during the processing, such as the absence of '?' or the failure of the key-value pair format after '&' separation, the error will also be recorded and fed back to the front-end for corresponding processing.
[0126] In this embodiment, the visual editing module specifically displays the following information for users to view and modify: request address, request method, request body type, request parameter list, cookie, interface address IP protocol, interface address HTTP protocol version number, maximum transmission time, proxy address, proxy username and password, whether to include files, and user-agent settings, wherein the cookie information is extracted from the response header returned by the server during the execution of the curl command (specifically, the relevant cookie value can be obtained by parsing the 'Set-Cookie' field in the response header); the user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command (if the option exists), and if not, the default system user-agent value is displayed (such as 'Mozilla / 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit / 5.0 (KHTML, like Gecko) Chrome / XX.XX.XX Safari / 5.0', the specific default value depends on the system configuration).
[0127] In summary, the method and system of the present invention for parsing a proxy interface by curl command eliminates the trouble of manually registering a gateway interface. Users only need to enter the curl command to parse the curl command and generate a proxy interface, avoiding errors caused by manual input and improving the efficiency of the interface proxy and the availability of the proxy interface.
[0128] The above specific examples are used to illustrate the principles and implementation methods of the present invention in detail. These examples are only used to help understand the core technical content of the present invention. Based on the above specific embodiments of the present invention, any improvements and modifications made by those skilled in the art without departing from the principles of the present invention should fall within the scope of patent protection of the present invention.
Claims
1. A method for proxying an interface by parsing a curl command, characterized in that: The steps include: S1. The user calls the interface in a third-party tool by referring to the interface documentation. When the interface call is successful, copy the generated curl command and paste it into the front-end page. S2. The front-end page verifies the curl command, specifically checking whether the curl command contains special characters that affect command security or command parsing; checking whether the length of the curl command exceeds the preset length range; and using regular expressions to verify whether the curl command contains required information. S3, the front-end page transmits the verified curl command to the back-end for processing; after receiving the curl command, the back-end performs the following operations: (1) Detect whether the curl command is legal and whether it contains malicious commands or scripts, and execute the subsequent steps after passing the detection; (2) Use regular expressions to verify whether the format of the curl command is legal, and execute the subsequent steps if the verification is legal; the verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal; (3) Normalize the curl command: remove the leading and trailing spaces, and remove useless command symbols; (4) Remove the leading "curl" character for segmented processing; (5) Split the curl command into several instructions according to the spaces and store them in an array, each instruction is an option or an option parameter; S4. Refer to the curl documentation. The backend executes each instruction in the array in sequence and extracts five types of options, including the interface address, request method, parameter list, parameter position, and request body type, and their corresponding option parameters. S5. The backend processes the extracted interface address as follows and saves it into a parameter list: determines whether there is a protocol number. If not, it adds "http: / / " to the front; determines whether there is a "?"; if so, it intercepts the part after the question mark; splits the intercepted part into multiple key-value pairs using "&", each key-value pair is a string; traverses multiple key-value pairs, and intercepts each key-value pair into a parameter name and parameter value using "="; and saves the result into a parameter list; S6. The backend transmits the information extracted in step S4 to the frontend page for display. The displayed information is as follows: request address, request method, request body type, request parameter list, cookie, interface address IP protocol, interface address HTTP protocol version number, maximum transmission time, proxy address, proxy username and password, whether to include files, and user-agent setting. The cookie information is extracted from the response header returned by the server during the execution of the curl command. The user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command. S7. The user confirms the modification of the display information of the front-end page and saves it to the database. The back-end forms a proxy interface based on the saved information in the database, thereby realizing the gateway proxy function.
2. A system for proxying an interface by parsing curl commands, characterized in that: It includes a front end portion and a back end portion; The front-end part includes: Call the copy module, which allows users to call the interface in a third-party tool by referring to the interface documentation. When the interface call is successful, the generated curl command is copied and pasted into the verification transmission module. The verification and transmission module supports verifying the pasted curl command and transmitting the verified curl command to the backend. The verification process specifically includes: checking whether the curl command contains special characters that affect command security or command parsing; checking whether the length of the curl command exceeds the preset length range; and using regular expressions to verify whether the curl command contains required information. The visual editing module supports displaying the transmission information of the backend part for users to view and modify; The transmission and saving module supports transmitting the display information modified and confirmed by the user to the database for storage; The backend part includes: The receiving and splitting module supports receiving the curl command transmitted by the verification transmission module, and first performs the following operations: (1) Detects whether the curl command is legal and whether it contains malicious commands or scripts, and executes the subsequent steps after passing the detection; (2) Uses regular expressions to verify whether the format of the curl command is legal, and executes the subsequent steps if the verification is legal; wherein, the verification content includes: whether it contains the "curl" character, whether it contains special characters, whether it contains characters that are not curl commands, whether it contains the request address, and whether the included request address is legal; (3) Normalizes the curl command: removes the leading and trailing spaces, and removes useless command symbols; (4) Removes the leading "curl" character for segmentation; then splits the curl command into several instructions according to the spaces and stores them in an array, each instruction is an option or an option parameter; The execution extraction module supports referring to the curl usage documentation, executing each instruction in the array in sequence, and extracting five types of options and corresponding option parameters: interface address, request method, parameter list, parameter position, and request body type; The address processing module supports the following processing of the extracted interface address and saves it into the parameter list: determine whether there is a protocol number, if not, add "http: / / " in front; determine whether there is a "?", if so, intercept the part after the question mark; split the intercepted part into multiple key-value pairs using "&", each key-value pair is a string; traverse multiple key-value pairs, and intercept each key-value pair into parameter name and parameter value according to "="; save the result into the parameter list; The information transmission module supports transmitting the information extracted by the extraction module to the visual editing module; The visual editing module displays the following information for users to view and modify: request address, request method, request body type, request parameter list, cookies, interface address IP protocol, interface address HTTP protocol version number, maximum transmission time, proxy address, proxy username and password, whether to include files, and user-agent settings. Cookie information is extracted from the response header returned by the server during the execution of the curl command, and the user-agent setting displays the parameter value corresponding to the '-A' or '--user-agent' option in the curl command; The proxy implementation module supports the formation of proxy interface based on the saved information in the database to realize the gateway proxy function.