Method, device and equipment for importing VPS configuration information of static IP and medium

By automatically obtaining IP addresses and generating connection information on VPS, the complex problem of cross-border e-commerce sellers configuring VPS information is solved, and user-friendly automated configuration and management is achieved.

CN120582984APending Publication Date: 2025-09-02ZIXUN TECHNOLOGY (FUJIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510897692.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

After purchasing VPS, cross-border e-commerce sellers find it difficult to obtain and configure the IP information of the VPS by themselves, resulting in a complicated import process and unfriendly user experience.

Method used

By automatically obtaining the IP address and unique identifier of the network card on the VPS, generating a random port and password, uploading it to the server and binding it with the user ID, automatic configuration information import is realized.

Benefits of technology

Users do not need to manually configure VPS information, but directly manage online stores through the client, simplifying the VPS usage process and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120582984A_ABST
    Figure CN120582984A_ABST
Patent Text Reader

Abstract

The invention provides a VPS configuration information importing method, device and equipment of a static IP, and a medium. The method comprises the following steps: logging in a VPS, obtaining all network cards on the VPS, detecting available network cards, obtaining IP addresses corresponding to the available network cards, and constructing a mapping list containing the IP addresses and unique identifiers of the network cards; randomly available ports, accounts and passwords are generated on the VPS to serve as VPS connection information; the VPS sends the user information, the connection VPS information and the mapping list to the server; the server obtains a corresponding user ID according to the user information, binds the connection VPS information and the mapping list with the user ID, and stores the connection VPS information and the mapping list in a database; and the server imports the connection VPS information and the mapping list into the client corresponding to the user ID, so that the client can directly import the VPS configuration information without user configuration, and the user can use the VPS configuration information conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for importing static IP VPS configuration information. Background Art

[0002] VPS (Virtual Private Server) is a server solution based on virtualization technology. It provides users with independent computing resources by dividing a physical server into multiple virtual private servers.

[0003] In the prior art, it is possible to connect to a VPS through the Purple Bird browser, and the process includes:

[0004] Import VPS: Log in to the Purple Bird browser backend, enter the device management page, click "Add your own device", and select "VPS import";

[0005] Fill in the device information: Enter the VPS's IP address, port, username, password and other information. You can add it after the detection passes.

[0006] Using VPS: After adding successfully, you can use VPS directly in ZiNiao Browser to access the target platform. ZiNiao Browser integrates the functions of VPS to provide cross-border e-commerce sellers with a more efficient and secure multi-account management solution; however, it is necessary to fill in the device information. After the user purchases the VPS device, only the account ID is obtained. The user needs to obtain other information by himself. Most cross-border e-commerce sellers are not programmers and are very unfamiliar with VPS operations. This increases the difficulty for users to purchase and import VPS independently, which is very unfriendly to users. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for importing VPS configuration information of static IP, so that the client can directly import VPS configuration information without user configuration, which is convenient for user use.

[0008] In a first aspect, the present invention provides a method for importing VPS configuration information of a static IP, comprising the following steps:

[0009] Step 1: Log in to the VPS, obtain all network cards on the VPS, detect the available network cards, obtain the IP addresses corresponding to the available network cards, and build a mapping list containing the IP addresses and unique identifiers of the network cards;

[0010] Step 2: Generate a random available port, account, and password on the VPS as the VPS connection information;

[0011] Step 3. The VPS sends the user information, connected VPS information, and mapping list to the server;

[0012] Step 4: The server obtains the corresponding user ID based on the user information, binds the connection VPS information and mapping list to the user ID, and stores them in the database; the server imports the connection VPS information and mapping list into the client corresponding to the user ID.

[0013] In a second aspect, the present invention provides a device for importing VPS configuration information of a static IP, comprising:

[0014] Obtain a mapping table module, log in to the VPS, obtain all network cards on the VPS, detect available network cards, obtain the IP addresses corresponding to the available network cards, and construct a mapping list containing the IP addresses and unique identifiers of the network cards;

[0015] Obtain the VPS connection information module and generate a random available port, account, and password on the VPS as the VPS connection information;

[0016] Upload information module, VPS sends user information, connected VPS information and mapping list to the server;

[0017] The storage import module obtains the corresponding user ID according to the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database; the server imports the connection VPS information and the mapping list into the client corresponding to the user ID.

[0018] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the method described in the first aspect when the program is executed by a processor.

[0020] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:

[0021] After purchasing a VPS, users often do not know how to import the IP information of the VPS and other information for application use, and the configuration requires a threshold. Through the method of the present invention, after the user logs in to the VPS, the information required for configuration can be automatically generated and transmitted to the server. The server interacts with the client to directly complete the configuration of the client. The user can directly use the client without performing any operations, which greatly facilitates the user's use and can manage his online store, etc. through the client.

[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0024] Figure 1 This is a flowchart of the method in Example 1 of the present invention;

[0025] Figure 2 This is a schematic diagram of the structure of the device in Example 2 of the present invention. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of this application have the following general ideas:

[0027] 1. Detect all network cards on the VPS, then detect the available network cards, and obtain the IP addresses corresponding to the network cards. If multiple network cards are available, multiple IP addresses will be obtained.

[0028] 2. Combine an IP address with a randomly generated available port, account number, and password;

[0029] 3. Report the above key information to the server through the interface;

[0030] 4. The server records the corresponding information and applies it to the corresponding application, and binds it with the user information. For example, by binding this information in the Zi Niao browser, the merchant's online store can be managed. The VPS can be Alibaba VPS, Huawei VPS or Tencent VPS;

[0031] The details are as follows:

[0032] 1. Get Intranet Info

[0033] Traverse all active network interfaces (network cards) in the system and obtain their IP addresses and MAC addresses. In a VPS, one network card can correspond to one IP address, or multiple network cards can correspond to one IP address. If multiple network cards correspond to one IP address, a random network card will be used; there are also cases where one network card corresponds to one IP address, in which case a one-to-one correspondence is sufficient;

[0034] Filter out valid IP addresses and build a list containing the IP and a unique identifier (such as MAC address or DHCP information).

[0035] Code example:

[0036] 1. Get all network interfaces, go language:

[0037] iFaces,err:=net.Interfaces()

[0038] Use net.Interfaces() to get all network interfaces in the system.

[0039] 2. Traverse the network interface:

[0040] Check if the interface is active (face.Flags & net.FlagUp).

[0041] Get the IP address of the interface, go language:

[0042] addrs,err:=face.Addrs()

[0043] Iterate over the IP addresses, filter out IPv4 addresses, and exclude 127.0.0.1 (the local loopback address).

[0044] 3. Generate a unique identifier:

[0045] If the interface has a hardware address (MAC address), use the MAC address as the unique identifier.

[0046] If there is no MAC address, the router attempts to obtain the DUID and IAID from the DHCPv6 information as a unique identifier.

[0047] 4. Return results:

[0048] Encapsulate the valid intranet IP and unique identifier into the model.IfaceInfo structure and return a list.

[0049] 2. Get DHCPv6 Information (GetDHCPv6Info)

[0050] Function:

[0051] Execute the system command ipconfig / all, parse the output, and extract DHCPv6 related information (such as IPv4 address, IAID, and DUID).

[0052] The parsed information is stored in a mapping table for subsequent use.

[0053] Code example:

[0054] 1. Execute system commands, go language:

[0055] cmd:=exec.Command("ipconfig"," / all")

[0056] Use exec.Command to execute the ipconfig / all command to obtain network configuration information.

[0057] 2. Parse command output:

[0058] Use findstr to filter out the lines containing IPv4 and DHCPv6.

[0059] Parse the output line by line to extract the IPv4 address, IAID, and DUID.

[0060] 3.Store DHCP information:

[0061] The parsed DHCP information is stored in the model.Dhcpv6Info structure and stored in the DHCPInfo mapping table with the IPv4 address as the key.

[0062] 3. Batch Import IP Proxy Information (BatchImportIp)

[0063] Function:

[0064] Import IP proxy information into the system in batches, supporting initial import and update operations.

[0065] Check the legitimacy of the IP proxy (such as whether it has been imported and whether it is a safe IP).

[0066] Interact with external services, upload proxy information and get return results.

[0067] Configure and start the FRP (Fast Reverse Proxy) service for intranet penetration.

[0068] Code example:

[0069] 1. Initialize variables:

[0070] Define the list inInfoList used to store import results.

[0071] Initialize the logging variable vpsKeyActionLog to record the log of the import operation.

[0072] 2. Get authentication information, go language:

[0073] username,password,_:=softHelp.GetProxyAuth()

[0074] Get proxy authentication information (username and password) from the system.

[0075] 3. Check IP proxy information:

[0076] Traverse the input IP proxy list list and check the import status and risk status of each proxy.

[0077] If the agent does not meet the import conditions (for example, it has already been imported or the risk is too high), an error message is returned.

[0078] 4. Build agent information:

[0079] Build upload data for each legitimate IP proxy, including IP address, port, username, password, country, time zone and other information.

[0080] If the Vless agent is enabled, generate Vless configuration information.

[0081] 5. Upload agent information, go language:

[0082] data,err:=proxyUpload(datas,importType)

[0083] Upload the constructed proxy information to the external service and obtain the return result.

[0084] 6. Process the returned results:

[0085] If the upload is successful, parse the returned proxy information and update the proxy's dynamic IP (if applicable).

[0086] Configure the FRP service, including generating the FRP configuration file and starting the FRP process.

[0087] 7. Record logs:

[0088] The import operation log is recorded in vpsKeyActionLog and uploaded to the server asynchronously.

[0089] This invention is used to manage and import IP proxy information, supports the processing of dynamic and static IPs, and configures FRP services to achieve intranet penetration. It is suitable for scenarios that require batch management of IP proxies, such as cross-border e-commerce and multi-account management.

[0090] Example 1

[0091] like Figure 1 As shown, this embodiment provides a method for importing VPS configuration information of a static IP, including the following steps:

[0092] Step 1: Log in to the VPS, obtain all network cards on the VPS, detect the available network cards, obtain the IP addresses corresponding to the available network cards, and build a mapping list containing the IP addresses and unique identifiers of the network cards;

[0093] Step 2: Generate a random available port, account, and password on the VPS as the VPS connection information;

[0094] Step 3. The VPS sends the user information, connected VPS information, and mapping list to the server;

[0095] Step 4: The server obtains the corresponding user ID based on the user information, binds the connection VPS information and mapping list to the user ID, and stores them in the database; the server imports the connection VPS information and mapping list into the client corresponding to the user ID.

[0096] In this embodiment, preferably, step 1 specifically includes: logging into the VPS, obtaining all network cards on the VPS, detecting available network cards therein, obtaining IP addresses corresponding to the available network cards, and if there are multiple available network cards, obtaining corresponding IP addresses one by one; and constructing a mapping list including IP addresses and unique identifiers of network cards;

[0097] If the MAC address exists, use the MAC address as the unique identifier; if the MAC address does not exist, obtain the DUID and IAID from the DHCPv6 information as the unique identifier;

[0098] The IP address and DHCPv6 information are obtained by executing the ipconfig / all command using exec.Command to obtain network configuration information; filtering out lines containing IPv4 and DHCPv6; parsing the output line by line to extract the IP address and DHCPv6 information.

[0099] In this embodiment, preferably, the step 2 specifically includes: generating a random available port, account number and password on the VPS as VPS connection information; one IP address corresponds to one VPS connection information.

[0100] In this embodiment, preferably, step 4 is specifically as follows: the server obtains the corresponding user ID based on the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database to generate a configuration file; the server sends the configuration file to the corresponding user, and the configuration file is imported into the client corresponding to the user.

[0101] Based on the same inventive concept, this application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0102] Example 2

[0103] like Figure 2As shown, in this embodiment, a device for importing VPS configuration information of a static IP is provided, including:

[0104] Obtain a mapping table module, log in to the VPS, obtain all network cards on the VPS, detect available network cards, obtain the IP addresses corresponding to the available network cards, and construct a mapping list containing the IP addresses and unique identifiers of the network cards;

[0105] Obtain the VPS connection information module and generate a random available port, account, and password on the VPS as the VPS connection information;

[0106] Upload information module, VPS sends user information, connected VPS information and mapping list to the server;

[0107] The storage import module obtains the corresponding user ID according to the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database; the server imports the connection VPS information and the mapping list into the client corresponding to the user ID.

[0108] In this embodiment, preferably, the mapping table acquisition module specifically includes: logging into the VPS, acquiring all network cards on the VPS, detecting available network cards therein, acquiring IP addresses corresponding to the available network cards, and if there are multiple available network cards, acquiring corresponding IP addresses one by one; and constructing a mapping list including IP addresses and unique identifiers of network cards;

[0109] If the MAC address exists, use the MAC address as the unique identifier; if the MAC address does not exist, obtain the DUID and IAID from the DHCPv6 information as the unique identifier;

[0110] The IP address and DHCPv6 information are obtained by executing the ipconfig / all command using exec.Command to obtain network configuration information; filtering out lines containing IPv4 and DHCPv6; parsing the output line by line to extract the IP address and DHCPv6 information.

[0111] In this embodiment, preferably, the module for obtaining the connection VPS information specifically generates a random available port, account number and password on the VPS as the connection VPS information; one IP address corresponds to one piece of connection VPS information.

[0112] In this embodiment, preferably, the storage and import module is specifically as follows: the server obtains the corresponding user ID based on the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database to generate a configuration file; the server sends the configuration file to the corresponding user, and the configuration file is imported into the client corresponding to the user.

[0113] Since the device described in the second embodiment of the present invention is used to implement the method of the first embodiment of the present invention, those skilled in the art will be able to understand the specific structure and variations of the device based on the method described in the first embodiment of the present invention, and therefore will not be described in detail here. All devices used in the method of the first embodiment of the present invention fall within the scope of protection of the present invention.

[0114] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.

[0115] Example 3

[0116] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.

[0117] Since the electronic device described in this embodiment is the device used to implement the method in Example 1 of this application, based on the method described in Example 1 of this application, those skilled in the art will be able to understand the specific implementation of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. As long as the device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection to be provided by this application.

[0118] Based on the same inventive concept, this application provides a storage medium corresponding to Example 1, see Example 4 for details.

[0119] Example 4

[0120] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any implementation method in the first embodiment can be implemented.

[0121] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0125] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for importing VPS configuration information of a static IP, characterized by: The steps include: Step 1: Log in to the VPS, obtain all network cards on the VPS, detect the available network cards, obtain the IP addresses corresponding to the available network cards, and build a mapping list containing the IP addresses and unique identifiers of the network cards; Step 2: Generate a random available port, account, and password on the VPS as the VPS connection information; Step 3. The VPS sends the user information, connected VPS information, and mapping list to the server; Step 4: The server obtains the corresponding user ID based on the user information, binds the connection VPS information and mapping list to the user ID, and stores them in the database; the server imports the connection VPS information and mapping list into the client corresponding to the user ID.

2. The method for importing VPS configuration information of a static IP according to claim 1, characterized in that: The step 1 specifically includes: logging into the VPS, obtaining all network cards on the VPS, detecting available network cards, obtaining IP addresses corresponding to the available network cards, and if there are multiple available network cards, obtaining corresponding IP addresses one by one; And build a mapping list containing IP addresses and network card unique identifiers; If the MAC address exists, use the MAC address as the unique identifier; if the MAC address does not exist, obtain the DUID and IAID from the DHCPv6 information as the unique identifier; The IP address and DHCPv6 information are obtained by executing the ipconfig / all command using exec.Command to obtain network configuration information; filtering out lines containing IPv4 and DHCPv6; parsing the output line by line to extract the IP address and DHCPv6 information.

3. The method for importing VPS configuration information of a static IP according to claim 2, characterized in that: The step 2 specifically includes: generating a random available port, account number and password on the VPS as VPS connection information; one IP address corresponds to one VPS connection information.

4. The method for importing VPS configuration information of a static IP according to claim 1, characterized in that: The specific steps of step 4 are as follows: the server obtains the corresponding user ID based on the user information, binds the connection VPS information and the mapping list to the user ID, stores them in the database, and generates a configuration file; the server sends the configuration file to the corresponding user, and the configuration file is imported into the client corresponding to the user.

5. A device for importing VPS configuration information of a static IP, characterized by: include: Obtain a mapping table module, log in to the VPS, obtain all network cards on the VPS, detect available network cards, obtain the IP addresses corresponding to the available network cards, and construct a mapping list containing the IP addresses and unique identifiers of the network cards; Obtain the VPS connection information module and generate a random available port, account, and password on the VPS as the VPS connection information; Upload information module, VPS sends user information, connected VPS information and mapping list to the server; The storage import module obtains the corresponding user ID according to the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database; the server imports the connection VPS information and the mapping list into the client corresponding to the user ID.

6. The device for importing VPS configuration information of a static IP according to claim 5, characterized in that: The mapping table acquisition module specifically includes: logging into the VPS, acquiring all network cards on the VPS, detecting available network cards therein, acquiring IP addresses corresponding to the available network cards, and if there are multiple available network cards, acquiring corresponding IP addresses one by one; And build a mapping list containing IP addresses and network card unique identifiers; If the MAC address exists, use the MAC address as the unique identifier; if the MAC address does not exist, obtain the DUID and IAID from the DHCPv6 information as the unique identifier; The IP address and DHCPv6 information are obtained by executing the ipconfig / all command using exec.Command to obtain network configuration information; filtering out lines containing IPv4 and DHCPv6; parsing the output line by line to extract the IP address and DHCPv6 information.

7. The device for importing VPS configuration information of a static IP according to claim 6, characterized in that: The module for obtaining the connection VPS information specifically generates a random available port, account number, and password on the VPS as the connection VPS information; one IP address corresponds to one piece of connection VPS information.

8. The device for importing VPS configuration information of a static IP according to claim 5, characterized in that: The storage and import module is specifically as follows: the server obtains the corresponding user ID based on the user information, binds the connection VPS information and the mapping list with the user ID, and stores them in the database to generate a configuration file; the server sends the configuration file to the corresponding user, and the configuration file is imported into the client corresponding to the user.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.