# US 2017/0257449 A1 · Method for forwarding traffic in application on mobile intelligent terminal

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0257449 A1
- Document ID: US20170257449A1
- Status: Published application
- Kind: A1
- Application number: 15/507,277
- Filed: 2015-02-13
- Published: 2017-09-07
- Earliest claimed: 2014-09-16
- Assignees: Wangsu Science & Technology Co., Ltd.
- Applicants: Wangsu Science & Technology Co., Ltd.
- Inventors: Shuang ZOU; Mingxun ZHANG; Hong CHEN; Shuyou YANG; Hansheng LIAN
- Web page: https://patentgrep.com/patent/US20170257449A1

## CPC

- H04L 65/1059: End-user terminal functionalities specially adapted for real-time communication
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L 67/34: {involving the movement of software or configuration parameters (network booting or remote initial program loading [RIPL] G06F9/4416)}
- H04L 67/56: Provisioning of proxy services (store-and-forward switching systems in data switching networks H04L12/54)
- H04L 67/563: Data redirection of data network streams
- H04L 67/60: Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources (admission control or resource allocation H04L47/70)
- H04L 69/16: Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04W 4/50: Service provisioning or reconfiguring
- H04W 12/37: Managing security policies for mobile devices or for controlling mobile applications
- H04L 65/61: for supporting one-way streaming services, e.g. Internet radio
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)

## Abstract

The present disclosure provides a method for forwarding traffic in an application installed on a mobile intelligent terminal. The method may be suitable in iOS operating system. The method may include the following steps: 1) when an application in the iOS operating system is starting, determining whether a proxy service is required based on a configuration of the application, and when the proxy service is required, the application executing a network proxy managing operation: replacing a native HTTP proxy function in a dynamic library of the iOS operating system with an updated HTTP proxy function, the updated HTTP function including information of a proxy server; and replacing a native Socket connect-create function in the dynamic library of the iOS operating system with an updated Socket connect-create function, a connection target of the updated Socket connect-create function being the proxy server.

## Claims

### Claim 1

A method for forwarding traffic in an application on a mobile intelligent terminal, configured to be compatible with iOS operating system, comprising:
1) when an application in the iOS operating system is starting, determining whether a proxy service is required based on a configuration of the application, and when the proxy service is required, the application executing a network proxy managing operation by:
replacing a native HTTP proxy function in a dynamic library of the iOS operating system with an updated HTTP proxy function, the updated HTTP function including information of a proxy server; and
replacing a native Socket connect-create function in the dynamic library of the iOS operating system with an updated Socket connect-create function, a connection target of the updated Socket connect-create function being the proxy server;
2) when the application sends a HTTP request or a HTTPs request, utilizing the updated HTTP proxy function to point to the proxy server, and when the application sends a TCP/IP request, utilizing the updated Socket connect-create function to point to the proxy server.

### Claim 2 (depends on 1)

The method according to claim 1, the network proxy managing operation further comprising:
replacing native video display-related functions in a multimedia system library of the iOS operating system with, a plurality of updated video display-related functions; and
when the application accesses a remote video, utilizing the plurality of updated video display-related functions to access the proxy server.

### Claim 3 (depends on 1)

The method according to claim 1, wherein in 1), a process of replacing the native HTTP proxy function in the dynamic library of the iOS operating system with the updated HTTP proxy function comprises:
creating the updated HTTP proxy function, the updated HTTP proxy function including a first pointer address;
calculating an offset value of the native HTTP proxy function in the dynamic library to obtain a second pointer address of the native HTTP proxy function in the dynamic library; and
pointing the second pointer address to the updated HTTP proxy function and pointing the first pointer address to the native HTTP proxy function.

### Claim 4 (depends on 1)

The method according to claim 1, wherein in 1), a process of replacing the native Socket connect-create function in the dynamic library of the iOS operating system with the updated Socket connect-create function comprises:
calculating an offset value of the native Socket connect-create function in the dynamic library to obtain a first pointer address of the native Socket connect-create function in the dynamic library; and
pointing the first pointer address to the updated Socket connect-create function, and pointing the second pointer address that is originally pointed to the updated Socket connect-create function to the native Socket connect-create function.

### Claim 5 (depends on 2)

The method according to claim 2, wherein a process of replacing the native video display-related functions in the multimedia system library of the iOS operating system with the plurality of updated video display-related functions comprises:
creating categories in the multimedia system library;
creating updated video display-related functions in each category;
obtaining a pointer of each native video display-related function in the multimedia system library; and
replacing a pointer of each updated video display-related function with the pointer of each native video display-related function in the multimedia system library.

### Claim 6 (depends on 5)

The method according to claim 5, wherein replacing pointers is implemented by using a runtime technique.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the application comprises a software development kit, and the application calls the software development kit to start network proxy managing operation.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the application comprises code of the software development kit.

### Claim 9

A method for accessing network using transmission control protocol (TCP), configured to be compatible with iOS operating system, comprising:
calling a Socket connect-create function of the iOS operating system to create a connection;
if the Socket connect-create function is not replaced, calling a native Socket connect-create function of the iOS operating system so that the native Socket connect-create function establishes the connection with a source station and starts transferring data; and
if the Socket connect-create function is replaced, calling an updated Socket connect-create function so that the updated Socket connect-create function establishes the connection with a proxy server and informs the proxy server an address of the source station for the proxy server to establish the connection with the source station.

### Claim 10 (depends on 9)

The method according to claim 9, further comprising:
returning the connection with the proxy server, by the updated Socket connect-create function, to the application; and utilizing the updated Socket connect-create function and the connection with the proxy server to transfer data.

### Claim 11

A method for displaying network video using an application programming interface (API) provided by iOS operating system, configured to be compatible with iOS operating system, comprising:
utilizing a multimedia system library to access remote videos;
if a video display-related function is not replaced, directly utilizing a remote API in the iOS operating system;
if the video display-related function is replaced, calling corresponding video display-related functions in categories of the multimedia system library so that each category directs a uniform resource locator (URL) of an original video to a proxy server and transfers the URL of the original video to the proxy server in a form of parameters; and
accessing a remote video through the proxy server.

### Claim 12 (depends on 11)

The method according to claim 11, wherein the proxy server processes the URL and connects to a remote server such that proxy settings of the remote video is configured.
