Circuit assembling method, device and equipment for proxy service and medium
By designing multiple proxy links and employing a weighted scheduling strategy, the instability of connections in traditional proxy services when the main line fails is resolved, achieving high availability and optimized traffic scheduling, and ensuring the stability and performance of traffic forwarding.
Patent Information
- Application Number
- CN202511512729.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-02-13
AI Technical Summary
Traditional proxy services are prone to connection instability when the main line fails, and the backup line solution is unable to adapt to complex network conditions. Furthermore, different applications or websites may require specific types of proxy protocols.
The system employs a multi-proxy link design, combining the main line with multiple backup lines. Through a weighted fine-grained scheduling strategy, it can quickly switch to backup lines and select the optimal connection path based on protocol priority and link speed.
Ensure high service availability, avoid single points of failure, optimize traffic scheduling, ensure uninterrupted traffic forwarding, and improve overall performance.
Smart Images

Figure CN121530897A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a method, apparatus, device and medium for assembling lines for proxy services. Background Technology
[0002] In today's network environment, proxy services have become an important tool for many users to improve network access efficiency and protect privacy. However, when the primary line fails and becomes unusable, traditional backup line solutions reveal significant limitations. Traditional solutions often simply switch from the primary line to a pre-set backup line. This "single-line switching" mode is highly susceptible to backup line malfunctions under complex and ever-changing network conditions. Reasons for this include backup line server maintenance, being blocked by the target website, or restrictions imposed by the network provider. Furthermore, different applications or websites may require specific types of proxy protocols; if the protocols are incompatible, it can lead to unstable connections. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, apparatus, device and medium for assembling lines for proxy services, which facilitates quick connection restoration when using proxy services and ensures that the user is unaware of the connection.
[0004] In a first aspect, the present invention provides a method for assembling circuits for proxy services, comprising the following steps: Step 1: The client connects and communicates with the proxy server through the node; Step 2: When the connection fails, the client retrieves the node list from the node server; the node list includes: proxy IP, port, username, and password; Step 3: The client combines the proxy protocol with the node to create the corresponding link, thus obtaining a link set; Step 4: The client selects a link from the set of links and reconnects to the proxy server.
[0005] In a second aspect, the present invention provides an assembly line apparatus for agency services, comprising: The communication connection module allows the client to connect and communicate with the proxy server through a node. The node acquisition module retrieves a list of nodes from the node server when the connection fails. The node list includes: proxy IP, port, username, and password. The link module is created by the client combining the proxy protocol with the node to create the corresponding link and obtain the link set; The connection restoration module allows the client to select a link from the set of links and reconnect to the proxy server.
[0006] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0007] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0008] One or more technical solutions provided by this invention have at least the following technical effects or advantages: I. Ensure high availability of services and avoid single points of failure. Redundancy backup: Each proxy chain corresponds to 1 main line + multiple backup lines. When the main line fails, it can quickly switch to the backup line to avoid the overall service interruption due to the failure of a single line (for example, when the main target server crashes, the backup target line is automatically activated to ensure that traffic forwarding is not interrupted).
[0009] II. Optimize traffic scheduling to improve overall performance Weighted fine-grained scheduling: The line weight is calculated by combining "protocol priority + proxy chain priority" to support the optimal scheduling strategy.
[0010] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0011] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0012] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation
[0013] The overall concept of the technical solution in this application is as follows: 1. Obtain the link configuration (multiple servers connected in series) from the server and verify the validity of the configuration. 2. Traverse each link, check if the main line exists, and create many-to-many assembly lines according to various protocols. 3. Different protocols calculate based on weighting coefficients and link test speeds to select the optimal link for connection.
[0014] The code for implementing the backup line is as follows: package main import ( "fmt" "strings" "github.com / sirupsen / logrus" ) BackupLineManager type BackupLineManager struct { cfg *Config env *Environment lines *LineContainer fullInfos map[string]struct{} } / / NewBackupLineManager creates a backup line manager func NewBackupLineManager(cfg *Config, env *Environment, lines *LineContainer) *BackupLineManager { return &BackupLineManager{ cfg: cfg, env: env, lines: lines, fullInfos: make(map[string]struct{}), } } / / ApplyBackupChains func (b *BackupLineManager) ApplyBackupChains(chains *ChainsResponse)error { / / 1. Update backup proxy information b.updateBackupProxyCfg() / / 2. Apply a backup proxy chain for idx, chain := range chains.Chains { err := b.applyBackupChain(chain, idx) if err != nil { logrus.Warnf("apply backup chain error: %s", err) } } return nil } / / applyBackupChain Apply a single backup proxy chain func (b *BackupLineManager) applyBackupChain(chain []string, idx int)error { if len(chain) == 0 { return nil } chainStr := strings.Join(chain, ";") / / Create an alternate line for each alternate URL for i, backupUrl := range b.cfg.BackupForward { err := b.createBackupLine(chain, chainStr, backupUrl, idx, i) if err != nil { logrus.Errorf("create backup line error: %v", err) continue } } return nil } / / createBackupLine Creates a single backup line func (b *BackupLineManager) createBackupLine(chain []string, chainStrstring, backupUrl *URL, chainIdx, backupIdx int) error { backupFullInfo := chainStr + backupUrl.String() / / Check if a similar backup line already exists. if _, exist := b.fullInfos[backupFullInfo]; exist { logrus.Debugf("[Skip create line] Proxy chain - backup line - %d already exists", backupIdx) return nil } / / Generate backup line name lineName := fmt.Sprintf(LineChainBackupN, chainIdx, backupUrl.Scheme, backupIdx) / / Create alternative outbound options backupOpt, err := backupUrl.ToNetcoreOutboundOption() if err != nil { logrus.Errorf("[Creating a line] Proxy chain - backup line failed %s - %v", lineName,err) return err } / / Build outbound option chain var targetInfos []string outboundOptions := ToOutboundOptions(chain) outboundOptions = append(outboundOptions, backupOpt) / / Construct target information optionsLen := len(outboundOptions) - 1 for ii, outboundOption := range outboundOptions { if ii == optionsLen { / / Last option (target server) scheme, host, port := outboundOption.LineInfo() targetInfos = append(targetInfos, fmt.Sprintf("%v: / / %v:%v?proxy=true", scheme, host, port)) } else { / / Proxy servers in the proxy chain boxConfig := outboundOption.ToSingBoxConfig("", "") scheme, host, port := boxConfig.TargetInfo() targetInfos = append(targetInfos, fmt.Sprintf("%v: / / %v:%v",scheme, host, port)) } } / / Create the actual line line, err := b.env.CreateLine(lineName, outboundOptions) if err != nil { logrus.Errorf("[Creating a line] Proxy chain - backup line failed %s - %v", lineName,err) return err } / / Calculate weighting coefficients coefficient := b.cfg.Custom.SchemeCoefficient[backupUrl.Scheme] if coefficient <= 0 { coefficient = 1 } / / Store line information b.lines.Put(line.Name(), &Line{ line: line, typ: LineTypeChainBackup, fullInfo: backupFullInfo, targetInfos: targetInfos, coefficient: coefficient * b.cfg.Custom.ChainCoefficient, }) / / Marked as created b.fullInfos[backupFullInfo] = struct{}{} logrus.Infof("[Create Line] Proxy Chain - Backup Line - %d - (%s - %s)", backupIdx, LineTypeChainBackup, line.Name()) return nil } / / updateBackupProxyCfg Update backup proxy configuration func (b *BackupLineManager) updateBackupProxyCfg() { / / Here you can add the update logic for the backup proxy configuration. / / For example: Retrieve the latest list of backup proxies from the server. logrus.Debug("Update backup proxy configuration") } / / GetBackupLines retrieves all backup lines func (b *BackupLineManager) GetBackupLines() []*Line { var backupLines []*Line b.lines.Range(func(name string, line *Line) bool { if line.typ == LineTypeChainBackup { backupLines = append(backupLines, line) } return true }) return backupLines } / / GetBackupLinesByChain Retrieves backup lines based on the proxy chain func (b *BackupLineManager) GetBackupLinesByChain(chainStr string)[]*Line { var backupLines []*Line b.lines.Range(func(name string, line *Line) bool { if line.typ == LineTypeChainBackup && strings.Contains(line.fullInfo, chainStr) { backupLines = append(backupLines, line) } return true }) return backupLines } / / RemoveBackupLine Removes a backup line func (b *BackupLineManager) RemoveBackupLine(lineName string) error { line, exists := b.lines.Get(lineName) if!exists { return fmt.Errorf("backup line %s not found", lineName) } if line.typ != LineTypeChainBackup { return fmt.Errorf("line %s is not a backup line", lineName) } / / Remove from the manager b.lines.Delete(lineName) delete(b.fullInfos, line.fullInfo) / / Shut down the line if err := line.line.Close(); err != nil { logrus.Errorf("close backup line %s error: %v", lineName, err) } logrus.Infof("[Removed Line] Proxy Chain - Alternate Line - %s", lineName) return nil } / / GetBackupLineStats retrieves backup line statistics. func (b *BackupLineManager) GetBackupLineStats() *BackupLineStats { stats := &BackupLineStats{ TotalCount: 0, ActiveCount: 0, InactiveCount: 0, ByScheme: make(map[string]int), } b.lines.Range(func(name string, line *Line) bool { if line.typ == LineTypeChainBackup { stats.TotalCount++ / / Statistical Protocol Distribution scheme := b.extractSchemeFromLineName(name) stats.ByScheme[scheme]++ / / Check line status (the logic for checking this needs to be implemented based on the actual line status) if b.isLineActive(line) { stats.ActiveCount++ } else { stats.InactiveCount++} } return true }) return stats } / / isLineActive checks if the line is active. func (b *BackupLineManager) isLineActive(line *Line) bool { / / This needs to be implemented based on the actual line status check logic. / / For example: checking connection status, latency, etc. return true / / Temporarily returns true; actual checking logic needs to be implemented. } / / extractSchemeFromLineName Extracts the protocol from the line name. func (b *BackupLineManager) extractSchemeFromLineName(lineNamestring) string { / / Extract protocol information from line name / / For example: extract "http" from "chain-backup.chain-num:0.scheme:http.0". parts := strings.Split(lineName, ".") for _, part := range parts { if strings.HasPrefix(part, "scheme:") { return strings.TrimPrefix(part, "scheme:") } } return "unknown" } / / BackupLineStats: Backup Line Statistics type BackupLineStats struct { TotalCount int `json:"total_count"` ActiveCount int `json:"active_count"` InactiveCount int `json:"inactive_count"` ByScheme map[string]int `json:"by_scheme"` } / / Constant definition const ( LineChainBackupN = "chain-backup.chain-num:%d.scheme:%s.%d" LineTypeChainBackup = "chain-backup" ) Code for assembling the circuit: func (s *service) applyChains() error { / / 1. Update backup proxy information s.updateBackupProxyCfg() / / 2. Obtain the proxy chain chains, err := api.GetChainsDefault() / / chains, err := api.ForkGetChainsDefault() if err != nil { return fmt.Errorf("get chains error: %w", err) } / / 3. Application Proxy Chain for idx, chain := range chains.Chains { err = s.applyChain(chain, idx) if err != nil { logrus.Warnf("apply chain error: %s", err) } } return nil } func (l *LineManager) ApplyChain(chain []string, idx int) error { if len(chain) == 0 { return nil } chainStr := strings.Join(chain, ";") masterFullInfo := chainStr + l.cfg.MasterTarget.String() if _, ok := l.fullInfos[masterFullInfo]; ok { logrus.Debug("[Skip create line] Proxy chain - main line already exists") } else { lineName := fmt.Sprintf("%s.chain-num:%d.scheme:%s",LineChainMaster, idx, l.cfg.MasterTarget.Scheme) opt, err := l.cfg.MasterTarget.ToNetcoreOutboundOption() if err != nil { logrus.Errorf("[Creating a line] Proxy chain - main line failed %s - %v", lineName,err) return err } var targetInfos []string outboundOptions := ToOutboundOptions(chain) outboundOptions = append(outboundOptions, opt) optionsLen := len(outboundOptions) - 1 for i, outboundOption := range outboundOptions { if i == optionsLen { scheme, host, port := outboundOption.LineInfo() targetInfos = append(targetInfos, fmt.Sprintf("%v: / / %v:%v?proxy=true", scheme, host, port)) } else { boxConfig := outboundOption.ToSingBoxConfig("", "") scheme, host, port := boxConfig.TargetInfo() targetInfos = append(targetInfos, fmt.Sprintf("%v: / / %v:%v",scheme, host, port)) } } line, err := l.env.CreateLine(lineName, outboundOptions) if err != nil { logrus.Errorf("[Create line] Proxy chain - main line failed %s - %v", lineName,err) return err } coefficient := l.cfg.Custom.SchemeCoefficient[l.cfg.MasterTarget.Scheme] if coefficient <= 0 { coefficient = 1 } l.lines.Put(line.Name(), &Line{ line: line, typ: LineTypeChainMaster, fullInfo: masterFullInfo, targetInfos: targetInfos, coefficient: coefficient * l.cfg.Custom.ChainCoefficient, }) l.fullInfos[masterFullInfo] = struct{}{} logrus.Infof("[Create Line] Proxy Chain - Main Line - (%s - %s)",LineTypeChainMaster, line.Name()) } return nil } Optimized route implementation code: type Line struct { line C.Line / / A line belonging to the main environment. typ LineType / / Line type redirect C.Env / / Used when the line type is related to v2ray fullInfo string / / Complete information about the line targetInfos []string / / Scheme: / / ip:port of the link history
[10] *URLTestResult tmp int coefficient float64 / / Speed measurement coefficient } func (l *Line) URLTest(method string, url string, times int) { / / First speed test, results not used l.line.URLTestTimeout(method, url, DefaultTimeout) result := URLTestResult{ Count: uint8(times), Url: url, UpdateTime: time.Now(), } var total int64 for i := 0; i < times; i++ { delay, err := l.line.URLTestTimeout(method, url, DefaultTimeout) if err != nil { logrus.Warnf("[Speed test failed] Line (%s-%s) URLTest '%s': %v", l.Type(),l.Name(), url, err) result.FailedCount++ } else { total += delay.Milliseconds() logrus.Debugf("[Speed test successful] Line (%s-%s) URLTest '%s' success: %v", l.Type(), l.Name(), url, delay) } } if result.FailedCount < result.Count { result.DelayMs = float64(total) / (float64(result.Count -result.FailedCount)) result.Score = result.DelayMs * l.coefficient / / Multiply by a control coefficient to allow us to control which protocol to use. } / / Save speed measurement results l.tmp = (l.tmp + 1) % 10 l.history[l.tmp] = &result } func (l *LineManager) SwitchAutoSelector(num int, skipDirectMasterbool) ([]string, error) { lines := l.lines.Values() / / Sort all lines by score sort.Slice(lines, func(i, j int) bool { iR := lines[i].LastURLTestResult() jR := lines[j].LastURLTestResult() if iR.FailedCount == jR.FailedCount { return iR.Score < jR.Score } return iR.FailedCount < jR.FailedCount }) var lineNames []string var lineTargetInfos []string for _, line := range lines { if len(lineNames) >= 3 || !line.Valid() { break } if skipDirectMaster { if line.Name() == LineDirectMaster { continue } } lineTargetInfos = append(lineTargetInfos, strings.Join(line.TargetInfos(), ";")) lineNames = append(lineNames, line.Name()) } if len(lineNames) == 0 { return nil, nil } if len(lineNames) == 1 { logrus.Infof("[] - %s", lineNames[0]) return l.SwitchLine(lineNames[0]) } logrus.Infof("[] - %v", lineNames) return lineTargetInfos, l.env.SwitchAutoSelector(lineNames) } Example
[0015] like Figure 1 As shown, this embodiment provides a method for assembling lines for proxy services, including the following steps: Step 1: The client connects and communicates with the proxy server through the node; Step 2: When the connection fails, the client retrieves the node list from the node server; the node list includes: proxy IP, port, username, and password; Step 3: The client combines the proxy protocol with the node to create the corresponding link, thus obtaining a link set; Step 4: The client selects a link from the set of links and reconnects to the proxy server.
[0016] In this embodiment, preferably, step 3 specifically involves: the client creating a link based on each proxy protocol and node to obtain a link set, wherein the proxy protocols include: socks5, ssl, ssh, https, http, vless, zless, rawtext, and cdnwss; and each proxy protocol and node is combined to create a corresponding link.
[0017] In this embodiment, preferably, step 4 specifically involves: performing network speed tests on each link in the link set, and having the client select the fastest link to reconnect to the proxy server.
[0018] In this embodiment, preferably, step 4 specifically involves: measuring the time from sending a complete request to receiving a response for each link in the link set, without recording this time; measuring the time from sending a complete request to receiving a response for each link in the link set again, and obtaining the measurement time corresponding to each link; assigning a weight to each protocol; multiplying the measurement time corresponding to each link by the weight of the corresponding protocol to obtain the preferred product; selecting the three links with the smallest preferred product, randomly selecting one link, and having the client connect to the proxy server through this link.
[0019] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Example
[0020] like Figure 2 As shown, this embodiment provides an assembly line device for proxy services, including: The communication connection module allows the client to connect and communicate with the proxy server through a node. The node acquisition module retrieves a list of nodes from the node server when the connection fails. The node list includes: proxy IP, port, username, and password. The link module is created by the client combining the proxy protocol with the node to create the corresponding link and obtain the link set; The connection restoration module allows the client to select a link from the set of links and reconnect to the proxy server.
[0021] In this embodiment, preferably, the link creation module specifically involves: the client creating a link based on each proxy protocol and node to obtain a link set, wherein the proxy protocols include: socks5, ssl, ssh, https, http, vless, zless, rawtext, and cdnwss; and each proxy protocol and node is combined to create a corresponding link.
[0022] In this embodiment, preferably, the connection recovery module specifically performs network speed testing on each link in the link set, and the client selects the fastest link to reconnect to the proxy server.
[0023] In this embodiment, preferably, the connection recovery module specifically performs the following steps: First, it measures the time from sending a complete request to receiving a response for each link in the link set, without recording this time. Second, it measures the time from sending a complete request to receiving a response for each link in the link set again, obtaining the speed measurement time for each link. Third, it assigns a weight to each protocol. Fourth, it multiplies the speed measurement time for each link by the weight of the corresponding protocol to obtain a preferred product. Fifth, it selects the three links with the smallest preferred product, randomly selects one link, and the client connects to the proxy server through this link.
[0024] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.
[0025] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3. Example
[0026] 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, it can implement any of the implementation methods in Embodiment 1.
[0027] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.
[0028] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4. Example
[0029] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.
[0030] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.
[0031] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0032] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0033] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0034] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for assembling circuits for proxy services, characterized in that: Includes the following steps: Step 1: The client connects and communicates with the proxy server through the node; Step 2: When the connection fails, the client retrieves the node list from the node server; the node list includes: proxy IP, port, username, and password; Step 3: The client combines the proxy protocol with the node to create the corresponding link, thus obtaining a link set; Step 4: The client selects a link from the set of links and reconnects to the proxy server.
2. A method for assembling circuits for proxy services, characterized in that: Includes the following steps: Step 1: The client connects and communicates with the proxy server through the node; Step 2: When the connection fails, the client retrieves the node list from the node server; the node list includes: proxy IP, port, username, and password; Step 3: The client combines the proxy protocol with the node to create the corresponding link, thus obtaining a link set; Step 4: The client selects a link from the set of links and reconnects to the proxy server.
3. The method for assembling circuits for agency services according to claim 1, characterized in that: Step 4 specifically involves: performing network speed tests on each link in the link set, and having the client select the fastest link to reconnect to the proxy server.
4. The method for assembling circuits for proxy services according to claim 1, characterized in that: Step 4 specifically involves: measuring the time from sending a complete request to receiving a response for each link in the link set, without recording this time; measuring the time from sending a complete request to receiving a response for each link in the link set again, and obtaining the measurement time for each link; assigning a weight to each protocol; multiplying the measurement time for each link by the weight of the corresponding protocol to obtain the optimal product; selecting the three links with the smallest optimal product, randomly selecting one link, and having the client connect to the proxy server through this link.
5. An assembly line device for agency services, characterized in that: include: The communication connection module allows the client to connect and communicate with the proxy server through a node. The node acquisition module retrieves a list of nodes from the node server when the connection fails. The node list includes: proxy IP, port, username, and password. The link module is created by the client combining the proxy protocol with the node to create the corresponding link and obtain the link set; The connection restoration module allows the client to select a link from the set of links and reconnect to the proxy server.
6. An assembly line device for agency services according to claim 5, characterized in that: The link creation module specifically involves the client creating a link set based on each proxy protocol and node. The proxy protocols include: socks5, ssl, ssh, https, http, vless, zless, rawtext, and cdnwss. Each proxy protocol and node is combined to create a corresponding link.
7. An assembly line device for agency services according to claim 5, characterized in that: The connection restoration module specifically performs network speed tests on each link in the link set, and the client selects the fastest link to reconnect to the proxy server.
8. An assembly line device for agency services according to claim 5, characterized in that: The connection recovery module specifically performs the following steps: For each link in the link set, a complete speed measurement is performed from sending a request to receiving a response, without recording this time; for each link in the link set, another complete speed measurement is performed from sending a request to receiving a response, obtaining the speed measurement time for each link; a weight is assigned to each protocol; the speed measurement time for each link is multiplied by the weight of the corresponding protocol to obtain the optimal product; the three links with the smallest optimal product are selected, and one link is randomly chosen for the client to connect to the proxy server through that link.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.