WO2016141549A1 - 数据传输方法和设备 - Google Patents

数据传输方法和设备 Download PDF

Info

Publication number
WO2016141549A1
WO2016141549A1 PCT/CN2015/073946 CN2015073946W WO2016141549A1 WO 2016141549 A1 WO2016141549 A1 WO 2016141549A1 CN 2015073946 W CN2015073946 W CN 2015073946W WO 2016141549 A1 WO2016141549 A1 WO 2016141549A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
proxy device
tls
uri
requires
Prior art date
Application number
PCT/CN2015/073946
Other languages
English (en)
French (fr)
Inventor
熊春山
应江威
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201580056399.8A priority Critical patent/CN107079048A/zh
Priority to PCT/CN2015/073946 priority patent/WO2016141549A1/zh
Publication of WO2016141549A1 publication Critical patent/WO2016141549A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a data transmission method and device.
  • Over The Top Serve is an application where content or services are built on top of the basic telecommunication services and does not require additional support from the network operator.
  • the OTT service can be specifically audio and video services, and gradually includes A variety of content and services based on the Internet.
  • the user In many existing OTT applications, the user generally inputs the Uniform Resource Locator (English: Uniform Resource Locator, URI) address to the OTT in the User Equipment (English: User Equipment, UE for short) browser.
  • Uniform Resource Locator English: Uniform Resource Locator, URI
  • the server requests the service, and the intermediate network node, for example, the value added service (VAS) function entity, can obtain the service request sent by the UE to the OTT server, and obtain the unencrypted data that the UE downloads from the OTT server, and then These data are processed, for example, webpage filtering, video acceleration, audio acceleration, deep packet inspection (English: Deep Packet Inspection, DPI for short), lawful interception (English: Lawful Interception, referred to as LI), user behavior analysis and other value-added services. Processing operations.
  • VAS value added service
  • HTTPS Hypertext Transfer Protocol over Secure Socket Layer
  • TLS Transport Layer Security
  • the embodiments of the present invention provide a data transmission method and device, which are used to implement a service processing operation, such as a VAS operation, between a service processing device located between a UE and a server.
  • a service processing operation such as a VAS operation
  • an embodiment of the present invention provides a proxy device, including:
  • a receiving unit configured to receive a first Hypertext Transfer Protocol (English: Hyper Text Transfer Protocol, HTTP) request, where the first HTTP request includes a URI requested by the UE;
  • a first Hypertext Transfer Protocol English: Hyper Text Transfer Protocol, HTTP
  • a sending unit configured to: when the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication, send the server to the server by using a TLS channel between the proxy device and the server a first HTTP request; the TLS of the one-way authentication is a TLS that authenticates only the server;
  • the receiving unit is further configured to receive data, where the data is sent by the server through the TLS channel after receiving the first HTTP request;
  • the sending unit is further configured to send the data to the UE by using a service processing device.
  • the method further includes:
  • a processing unit configured to establish a TCP connection based on a Transmission Control Protocol (TCP) port 443 with the server; and establish the TLS channel with the server.
  • TCP Transmission Control Protocol
  • the receiving unit is further configured to: before receiving the first HTTP request sent by the UE, send the UE to send The TCP connection establishment request, the destination IP address in the Internet Protocol (English: Internet Protocol, IP for short) corresponding to the TCP connection establishment request is the IP address of the server;
  • the sending unit is further configured to send a TCP connection setup response to the UE to establish a TCP connection with the UE.
  • the processing unit is further configured to determine that the server is required before establishing a TLS channel with the server.
  • the processing unit when determining that the server is a server that requires TLS access with one-way authentication, Specifically, the URI of the server is obtained according to the URI requested by the UE. When it is determined that the URI of the server belongs to the first preset URI whitelist, the server is determined to be a TLS access requiring one-way authentication. a server; wherein the first preset URI The whitelist includes the URI of the server that requires TLS access with one-way authentication; or,
  • the IP address of the server Acquiring the IP address of the server according to the URI requested by the UE, or acquiring the IP address of the server from the IP header corresponding to the TCP connection establishment request; determining that the IP address of the server belongs to the first preset When the IP address is whitelisted, it is determined that the server is a server that requires TLS access with one-way authentication; the first preset IP address whitelist includes an IP address of a server that requires TLS access with one-way authentication.
  • the processing unit determines that the server is not a server that requires TLS access with one-way authentication, the processing unit forwards the TCP connection establishment request sent by the UE to the server;
  • the sending unit is further configured to: after the receiving unit receives the first HTTP request sent by the UE, forward the first HTTP request to the server.
  • the receiving unit is further configured to: before receiving the first HTTP request sent by the UE, a TCP connection establishment request, the destination IP address in the IP header corresponding to the TCP connection establishment request is an IP address of the proxy device;
  • the sending unit is further configured to send a TCP connection setup response message to the UE to establish a TCP connection with the UE.
  • the sending unit is further configured to perform the processing Sending, by the unit, the first HTTP request to the server through a TCP80 port before establishing a TLS channel with the server;
  • the receiving unit is further configured to receive a first redirect message sent by the server, where the first redirect message includes a URI requested by the UE, and the first redirect message is used to indicate the UE and the The server establishes a TLS channel;
  • the processing unit When the processing unit establishes a TLS channel with the server, the processing unit is configured to: establish the TLS channel with the server according to the first redirect message;
  • the processing unit is further configured to: before the sending unit sends the first HTTP request to the server by using a TLS channel between the proxy device and the server, when successfully establishing a TLS channel with the server, determining The server is a TLS connection that requires one-way authentication. Into the server.
  • the processing unit is further configured to: when the TLS channel fails to be established with the server, determine the server a server that requires TLS access with two-way authentication;
  • the sending unit is further configured to: forward the first redirect message sent by the server to the UE; and the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other.
  • the processing unit is further configured to send, by the sending unit, the server to the server by using a TCP 80 port. After an HTTP request, if the receiving unit does not receive the first redirect message sent by the server, it is determined that the server is not a server that requires TLS access with one-way authentication and a TLS interface that requires two-way authentication. Into the server;
  • the receiving unit is further configured to: receive data requested by the first HTTP request sent by the server;
  • the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other;
  • the sending unit is further configured to send data requested by the first HTTP request to the UE by using the service processing device.
  • the processing unit is further configured to determine that the server is required before establishing a TLS channel with the server.
  • the processing unit when determining that the server is a server that requires TLS access with one-way authentication Specifically, the method is: obtaining a URI of the server according to the URI requested by the UE; and determining that the URI of the server belongs to the first preset URI whitelist, determining that the server is a TLS access requiring one-way authentication Server; wherein the first preset URI whitelist includes a URI of a server that requires TLS access using one-way authentication; or
  • the first preset IP address white list includes an IP address of a server that requires TLS access using one-way authentication.
  • the sending unit is further configured to: when the processing unit determines that the server is a server that requires TLS access with two-way authentication, send a second redirect message to the UE; the processing unit is further used for The server establishes a TCP connection based on the TCP 443 port; the second redirect message includes a URI requested by the UE, and the second redirect message is used to indicate that the UE establishes a TLS channel with the server;
  • the processing unit is further configured to: when determining that the server is not a server that requires TLS access with mutual authentication, establish a TCP connection based on a TCP port of the server; the sending unit is further configured to forward the First HTTP request;
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the processing unit when determining that the server is a server that requires TLS access with two-way authentication Specifically, the method is: acquiring a URI of the server according to the URI requested by the UE; and determining that the URI of the server belongs to the second preset URI whitelist, determining that the server is a TLS access requiring two-way authentication. a server; wherein the second preset URI whitelist includes a URI of a server that requires TLS access using two-way authentication; or
  • the IP address of the server Determining, according to the URI requested by the UE, the IP address of the server; when determining that the IP address of the server belongs to the second preset IP address whitelist, determining that the server is a TLS access requiring two-way authentication The server; the second preset IP address whitelist includes an IP address of a server that requires TLS access using two-way authentication.
  • the receiving unit is further configured to receive the UE before receiving the first HTTP request sent by the UE.
  • a transparent connection request includes a formal domain name (Fully Qualified Domain Name, FQDN) and a TCP 443 port number of the server, where the transparent connection request is used to indicate that the UE needs to request through TCP 443 The port is connected to the server corresponding to the FQDN;
  • the sending unit is further configured to send a third weight to the UE according to the transparent connection request.
  • the third redirect message includes an FQDN and a TCP80 port number of the server, where the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP80 port to obtain The data corresponding to the URI requested by the UE.
  • the processing unit is further configured to: Before the UE sends the third redirect message, the server is determined to be a server that requires TLS access with one-way authentication according to the FQDN of the server.
  • the processing unit determines that the server is required to adopt one-way authentication according to an FQDN of the server
  • the TLS access server is specifically configured to: when it is determined that the FQDN of the server belongs to the first preset FQDN whitelist, determine that the server is a server that requires TLS access with one-way authentication;
  • the first preset FQDN white list includes the FQDN of the server that requires TLS access using one-way authentication; or
  • the URI of the server Determining, according to the FQDN of the server, the URI of the server; when determining that the URI of the server belongs to the first preset URI whitelist, determining that the server is a server that requires TLS access for one-way authentication, where
  • the first preset URI whitelist includes a URI of a server that requires TLS access using one-way authentication; or
  • the first preset IP address whitelist includes an IP address of a server that requires TLS access using one-way authentication.
  • the processing unit is further configured to: when determining that the server is a server that requires TLS access with two-way authentication, establish a TCP connection based on a TCP 443 port with the server; the sending unit is further configured to send to the UE a first determining message, the first determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port to obtain data corresponding to the URI requested by the UE;
  • the processing unit is further configured to: when determining that the server is not required to adopt mutual authentication When the server accesses the TLS, a TCP connection based on the TCP port is established with the server; the sending unit is further configured to send a fourth redirect message to the UE, where the fourth redirect message includes the FQDN and the TCP80 of the server. a port number, where the fourth redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP port to obtain data corresponding to the URI requested by the UE;
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the processing unit when determining that the server is a server that requires TLS access with mutual authentication Specifically, when determining that the FQDN of the server belongs to the second preset FQDN whitelist, determining that the server is a server that requires TLS access for mutual authentication, where the second preset FQDN whitelist includes The FQDN of the server that requires two-way authentication for TLS access; or,
  • the second preset URI whitelist includes a URI of a server that requires TLS access using two-way authentication; or
  • the IP address of the server when determining that the IP address of the server belongs to the whitelist of the second preset IP address, determining that the server is a server that requires TLS access with mutual authentication, where
  • the second preset IP address whitelist includes an IP address of a server that requires TLS access using two-way authentication.
  • the processing unit is further configured to: before the TLS channel is established with the server, according to the server
  • the FQDN generates a URI of the server; and generates a second HTTP request according to the URI of the server, the second HTTP request including a URI of the server;
  • the sending unit is further configured to send the second HTTP request to the server by using a TCP80 port;
  • the receiving unit is further configured to receive a fifth redirect message sent by the server, where the fifth redirect message includes a URI of the server, and the fifth redirect message is used to indicate Determining that the UE establishes a TLS channel with the server;
  • the processing unit When the processing unit establishes a TLS channel with the server, the processing unit is configured to: establish the TLS channel with the server according to the fifth redirect message;
  • the processing unit is further configured to: when the sending unit sends a third redirection message to the UE according to the transparent connection request, when the TLS channel is successfully established with the server, determining that the server is required to adopt one-way A server that authenticates TLS access.
  • the processing unit is further configured to: when the TLS channel fails to be established with the server, determine The server is a server that requires TLS access using two-way authentication;
  • the sending unit is further configured to send a second determining message to the UE, where the second determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port, where the two-way authentication is TLS is a TLS for the UE and the server to authenticate each other.
  • the processing unit is further configured to send, by the sending unit, the After the second HTTP request, if the receiving unit does not receive the fifth redirect message sent by the server, it is determined that the server is not a server that requires TLS access with one-way authentication and a TLS interface that requires two-way authentication.
  • the server is not a server that requires TLS access with one-way authentication and a TLS interface that requires two-way authentication.
  • the receiving unit is further configured to receive a third determining message that is sent by the server, where the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other;
  • the sending unit is further configured to send a sixth redirection message to the UE, where the sixth redirection message is used to indicate that the UE is connected to the server corresponding to the FQDN by using a TCP80 port to obtain the UE request.
  • the URI corresponds to the data.
  • the proxy device when the proxy device is established with the UE TCP connection based on TCP8443 port;
  • the processing unit is further configured to establish a TLS channel with the UE after the proxy device establishes a TCP connection based on a TCP8443 port with the UE.
  • an embodiment of the present invention provides a UE, including:
  • a sending unit configured to send an HTTP request, where the HTTP request includes the UE request URI
  • a receiving unit configured to receive, by the service processing device, data sent by the proxy device, where the data is received by the proxy device by the server corresponding to the URI, after receiving the HTTP request, between the proxy device and the server
  • the TLS channel is sent.
  • the sending unit is further configured to: before sending an HTTP request, send a TCP connection establishment request, where the destination IP address in the IP header corresponding to the TCP connection establishment request is The IP address of the server;
  • the receiving unit is further configured to receive a TCP connection establishment response sent by the proxy device to establish a TCP connection with the proxy device.
  • the sending unit is further configured to send a TCP connection establishment request to the proxy device before sending the HTTP request, where the TCP connection establishment request corresponds to an IP header
  • the destination IP address is an IP address of the proxy device
  • the receiving unit is further configured to receive a TCP connection establishment response sent by the proxy device to establish a TCP connection with the proxy device.
  • the sending unit when sending the HTTP request, is specifically configured to: when the URI indicates that the UE does not When a TLS channel needs to be established with the server, an HTTP request is sent to the proxy device.
  • the sending unit is further configured to: after the UE establishes a TCP connection with the proxy device,
  • the URI indicates that the UE needs to establish a TLS channel with the server, and sends a transparent connection request to the proxy device, where the transparent connection request includes an official domain name FDQN and a TCP 443 port number of the server, and the transparent connection request Used to indicate that the UE requests to connect to the server corresponding to the FQDN;
  • the receiving unit is further configured to receive a redirect message sent by the proxy device, where the redirect message includes an FQDN and a TCP80 port number of the server, where the redirect message is used to indicate that the UE is connected to the port through the TCP port.
  • the server corresponding to the FQDN acquires data corresponding to the URI requested by the UE;
  • the sending unit When the sending unit sends the HTTP request, the sending unit is specifically configured to: send the HTTP request according to the redirect message.
  • the UE when the UE establishes a TCP connection based on a TCP8443 port with the proxy device, the UE further includes:
  • a processing unit configured to establish a TLS channel with the proxy device after the UE establishes a TCP connection based on a TCP8443 port with the proxy device.
  • an embodiment of the present invention provides a data transmission method, including:
  • the proxy device receives a first HTTP request sent by the UE, where the first HTTP request includes a URI requested by the UE;
  • the proxy device When the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication, the proxy device sends the first page to the server through a TLS channel between the proxy device and the server.
  • the proxy device receives data, and the data is sent by the server through the TLS channel after receiving the first HTTP request;
  • the proxy device transmits the data to the UE through a service processing device.
  • the method further includes:
  • the proxy device establishes a TCP connection based on a TCP 443 port with the server;
  • the proxy device establishes the TLS channel with the server.
  • the method before the proxy device receives the first HTTP request sent by the UE, the method further includes:
  • the proxy device sends a TCP connection setup response to the UE to establish a TCP connection with the UE.
  • the method before the proxy device establishes a TLS channel with the server, the method further includes:
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication, and includes:
  • the proxy device acquires a URI of the server according to the URI requested by the UE, and when the proxy device determines that the URI of the server belongs to the first preset URI whitelist, the proxy device determines that the server is required to adopt a server for unidirectionally authenticated TLS access; wherein the first preset URI whitelist includes a URI of a server that requires TLS access using one-way authentication; or
  • the proxy device acquires an IP address of the server according to the URI requested by the UE, or the proxy device acquires an IP address of the server from an IP header corresponding to the TCP connection establishment request; when the proxy device When determining that the IP address of the server belongs to the first preset IP address whitelist, the proxy device determines that the server is a server that requires TLS access with one-way authentication; the first preset IP address whitelist includes The IP address of the server that requires TLS access with one-way authentication.
  • the method further includes: when the proxy device determines When the server is not a server that requires TLS access with one-way authentication, the proxy device forwards the TCP connection establishment request sent by the UE to the server;
  • the method further includes: the proxy device forwarding the first HTTP request to the server.
  • the method before the proxy device receives the first HTTP request sent by the UE, the method further includes:
  • the proxy device sends a TCP connection setup response message to the UE to establish a TCP connection with the UE.
  • the proxy device establishes a TLS channel with the server
  • the method further includes: the proxy device sending the first HTTP request to the server by using a TCP port; the proxy device receiving a first redirect message sent by the server, where the first redirect message includes the UE requested URI, said a redirect message is used to indicate that the UE establishes a TLS channel with the server;
  • Establishing a TLS channel with the server by the proxy device including: the proxy device establishing the TLS channel with the server according to the first redirect message;
  • the method further includes:
  • the proxy device When the proxy device successfully establishes a TLS channel with the server, the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the method further includes: when the proxy device fails to establish a TLS channel with the server, the proxy device determines The server is a server that requires TLS access with two-way authentication, and the proxy device forwards the first redirect message sent by the server to the UE; the TLS of the mutual authentication is the UE and the TLS that the servers authenticate each other.
  • the method further includes: If the proxy device does not receive the first redirect message sent by the server, the proxy device determines that the server is not a server that requires TLS access with one-way authentication and TLS access that requires two-way authentication. Server, and the proxy device receives data requested by the first HTTP request sent by the server; the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other;
  • the proxy device sends the data requested by the first HTTP request to the UE through the service processing device.
  • the method before the proxy device establishes a TLS channel with the server, the method further includes:
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication, including :
  • the proxy device acquires a URI of the server according to the URI requested by the UE; when the proxy device determines that the URI of the server belongs to the first preset URI whitelist, the generation The device determines that the server is a server that requires TLS access with one-way authentication; wherein the first preset URI white list includes a URI of a server that requires TLS access using one-way authentication; or
  • the proxy device acquires an IP address of the server according to the URI requested by the UE; when the proxy device determines that the IP address of the server belongs to the first preset IP address whitelist, the proxy device determines the server The server that requires TLS access with one-way authentication; the first preset IP address white list includes an IP address of a server that requires TLS access using one-way authentication.
  • the server when it comes to authenticated TLS access to the server, it also includes:
  • the proxy device determines that the server is a server that requires TLS access using two-way authentication
  • the proxy device sends a second redirect message to the UE, and the proxy device establishes a TCP 443 port with the server a TCP connection
  • the second redirect message includes a URI requested by the UE, and the second redirect message is used to indicate that the UE establishes a TLS channel with the server;
  • the proxy device determines that the server is not a server that requires TLS access using two-way authentication, the proxy device establishes a TCP connection based on a TCP 80 port with the server, and forwards the first HTTP request to the server;
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the proxy device determines that the server is a server that requires TLS access with mutual authentication, including :
  • the proxy device acquires a URI of the server according to the URI requested by the UE; when the proxy device determines that the URI of the server belongs to the second preset URI whitelist, the proxy device determines that the server is required to adopt a server for two-way authenticated TLS access; wherein the second preset URI whitelist includes a URI of a server that requires TLS access using two-way authentication; or
  • the proxy device acquires an IP address of the server according to the URI requested by the UE;
  • the proxy device determines that the IP address of the server belongs to the second preset IP address whitelist, the proxy device determines that the server is a server that requires TLS access with mutual authentication; the second preset IP
  • the address whitelist includes the IP address of the server that requires TLS access using two-way authentication.
  • the method before the proxy device receives the first HTTP request sent by the UE, the method further includes:
  • a transparent connection request sent by the UE where the transparent connection request includes an FQDN and a TCP 443 port number of the server, where the transparent connection request is used to indicate that the UE needs to request to connect to the port through a TCP 443 port.
  • the server corresponding to the FQDN;
  • the proxy device sends a third redirect message to the UE according to the transparent connection request, where the third redirect message includes an FQDN and a TCP80 port number of the server, where the third redirect message is used to indicate
  • the UE is connected to the server corresponding to the FQDN through a TCP port to obtain data corresponding to the URI requested by the UE.
  • the proxy device sends the third redirection message to the UE according to the transparent connection request ,Also includes:
  • the proxy device determines, according to the FQDN of the server, that the server is a server that requires TLS access using one-way authentication.
  • the proxy device determines, according to an FQDN of the server, that the server is required to adopt one-way authentication TLS access server, including:
  • the proxy device determines that the FQDN of the server belongs to the first preset FQDN whitelist
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication; wherein the first preset The FQDN whitelist includes the FQDN of the server that requires TLS access with one-way authentication; or,
  • the proxy device acquires a URI of the server according to the FQDN of the server; when the proxy device determines that the URI of the server belongs to the first preset URI whitelist, the proxy device determines that the server is required to adopt a single a server for authenticated TLS access, wherein the first preset URI whitelist includes a server that requires TLS access using one-way authentication URI; or,
  • the proxy device acquires an IP address of the server according to the FQDN of the server; when the proxy device determines that the IP address of the server belongs to the whitelist of the first preset IP address, the proxy device determines that the server is A server that uses unidirectionally authenticated TLS access is required, wherein the first preset IP address whitelist includes an IP address of a server that requires TLS access using one-way authentication.
  • the server when the server is not required to be used When the TLS access server is authenticated by one-way authentication, it also includes:
  • the proxy device determines that the server is a server that requires TLS access using two-way authentication
  • the proxy device establishes a TCP connection based on a TCP 443 port with the server, and the proxy device sends the first to the UE Determining a message, the first determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port to obtain data corresponding to the URI requested by the UE;
  • the proxy device determines that the server is not a server that requires TLS access using two-way authentication
  • the proxy device establishes a TCP connection based on a TCP 80 port with the server, and the proxy device sends a fourth weight to the UE Orientation message, the fourth redirect message includes an FQDN and a TCP80 port number of the server, where the fourth redirect message is used to indicate that the UE connects to a server corresponding to the FQDN through a TCP80 port to obtain the UE.
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the proxy device determines that the server is a server that requires TLS access with mutual authentication, including :
  • the proxy device determines that the FQDN of the server belongs to the second preset FQDN whitelist, the proxy device determines that the server is a server that requires TLS access with two-way authentication, where the second preset FQDN
  • the whitelist includes the FQDN of the server that requires TLS access with two-way authentication; or,
  • the proxy device acquires a URI of the server according to an FQDN of the server;
  • the proxy device determines that the URI of the server belongs to the second preset URI whitelist, the proxy device determines that the server determines that the server is a server that requires TLS access for mutual authentication, wherein the second pre- Let the URI whitelist include the URI of the server that requires TLS access with mutual authentication; or,
  • the proxy device acquires an IP address of the server according to an FQDN of the server; when the proxy device determines that the IP address of the server belongs to a second preset IP address whitelist, the proxy device determines that the server is A server that requires two-way authenticated TLS access, wherein the second preset IP address whitelist includes an IP address of a server that requires TLS access using two-way authentication.
  • the method before the proxy device establishes a TLS channel with the server, the method further includes:
  • the proxy device generates a URI of the server according to an FQDN of the server;
  • the proxy device generates a second HTTP request according to the URI of the server, where the second HTTP request includes a URI of the server;
  • the proxy device sends the second HTTP request to the server through a TCP80 port
  • the proxy device receives a fifth redirect message sent by the server, where the fifth redirect message includes a URI of the server, and the fifth redirect message is used to indicate that the UE establishes a TLS channel with the server. ;
  • the proxy device establishes a TLS channel with the server, including:
  • the proxy device establishes the TLS channel with the server according to the fifth redirect message
  • the method further includes: when the proxy device establishes a TLS channel with the server, the proxy device determines that the server is a request A server that uses unidirectional authentication for TLS access.
  • the method further includes:
  • the proxy device When the proxy device fails to establish a TLS channel with the server, the proxy device determines that the server is a server that requires TLS access using two-way authentication, and the proxy device sends a second determination message to the UE, The second determining message is used to indicate that the UE is connected to The TCP 443 port is connected to the server corresponding to the FQDN; wherein the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the method further includes: If the proxy device does not receive the fifth redirect message sent by the server, the proxy device determines that the server is not a server that requires TLS access with one-way authentication and TLS access that requires two-way authentication. The server, and the proxy device receives a third determination message sent by the server; wherein the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other;
  • the proxy device sends a sixth redirection message to the UE, where the sixth redirection message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP80 port to obtain a URI corresponding to the UE request The data.
  • the proxy device when the UE is established with the proxy device After the TCP connection based on the TCP8443 port is established, the proxy device establishes a TCP connection based on the TCP8443 port with the UE, and further includes:
  • the proxy device establishes a TLS channel with the UE.
  • an embodiment of the present invention provides a data transmission method, including:
  • the UE sends an HTTP request, where the HTTP request includes a URI requested by the UE;
  • the method before the sending the HTTP request by the UE, the method further includes:
  • the UE sends a TCP connection establishment request, and the destination IP address in the IP header corresponding to the TCP connection establishment request is an IP address of the server;
  • the UE receives a TCP connection setup response sent by the proxy device to establish a TCP connection with the proxy device.
  • the method before the sending the HTTP request by the UE, the method further includes:
  • the UE receives a TCP connection setup response sent by the proxy device to establish a TCP connection with the proxy device.
  • the sending, by the UE, an HTTP request includes: when the URI indicates that the UE does not need to be related to the server
  • the UE sends an HTTP request to the proxy device.
  • the method further includes: when the URI indicates the When the UE needs to establish a TLS channel with the server, the UE sends a transparent connection request to the proxy device, where the transparent connection request includes an official domain name FDQN and a TCP 443 port number of the server, and the transparent connection request is used to indicate The UE requests to connect to the server corresponding to the FQDN;
  • a redirect message sent by the proxy device where the redirect message includes an FQDN and a TCP80 port number of the server, where the redirect message is used to indicate that the UE is connected to the FQDN through a TCP80 port.
  • Corresponding server to obtain data corresponding to the URI requested by the UE;
  • the sending, by the UE, an HTTP request includes: sending, by the UE, the HTTP request according to the redirect message.
  • the method further includes:
  • the UE establishes a TLS channel with the proxy device.
  • the proxy device receives the first HTTP request that is sent by the UE and includes the URI requested by the UE; and the server corresponding to the URI requested by the UE is the TLS access that requires one-way authentication.
  • the server sends the first HTTP to the server through the TLS channel between the proxy device and the server corresponding to the URI requested by the user. Requesting; then receiving data that is sent by the server over the TLS channel after receiving the first HTTP request; the data is sent to the UE by the service processing device.
  • the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server.
  • the data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • Embodiment 1 is a schematic structural diagram of Embodiment 1 of a proxy device according to the present invention.
  • Embodiment 2 is a schematic structural diagram of Embodiment 2 of a proxy device according to the present invention.
  • Embodiment 3 is a schematic structural diagram of Embodiment 1 of a UE according to the present invention.
  • Embodiment 4 is a schematic structural diagram of Embodiment 2 of a UE according to the present invention.
  • FIG. 5 is a flowchart of Embodiment 1 of a data transmission method according to the present invention.
  • Embodiment 6 is a flowchart of Embodiment 2 of a data transmission method according to the present invention.
  • FIG. 7 is a flowchart of Embodiment 3 of a data transmission method according to the present invention.
  • Embodiment 8 is a flowchart of Embodiment 4 of a data transmission method according to the present invention.
  • Embodiment 9 is a flowchart of Embodiment 5 of a data transmission method according to the present invention.
  • Embodiment 6 is a flowchart of Embodiment 6 of a data transmission method according to the present invention.
  • FIG. 11 is a flowchart of Embodiment 7 of a data transmission method according to the present invention.
  • Embodiment 8 of a data transmission method according to the present invention.
  • FIG. 13 is a flowchart of Embodiment 9 of a data transmission method according to the present invention.
  • the proxy device in the following embodiments of the present invention is a proxy device of the UE for the server, and the server will use the proxy device as the UE; for the UE, it is the proxy device of the server, and the UE will use the proxy device as the server.
  • FIG. 1 is a schematic structural diagram of Embodiment 1 of a proxy device according to the present invention.
  • the proxy device in this embodiment may include: a receiving unit 11 and a sending unit 12, where the receiving unit 11 is configured to receive a An HTTP request, the first HTTP request includes a URI requested by the UE, and the sending unit 12 is configured to: when the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication, Transmitting, by the TLS channel between the proxy device and the server, the first HTTP request to the server; the TLS of the one-way authentication is a TLS that only authenticates the server; and the receiving unit 11 is further configured to receive Data, the data is sent by the server through the TLS channel after receiving the first HTTP request, and the sending unit 12 is further configured to send the data to the UE by using a service processing device.
  • the proxy device of this embodiment may further include: a processing unit 13; wherein the processing unit 13 is configured to establish a TCP 443 port-based TCP connection with the server; and establish the TLS channel with the server.
  • the receiving unit 11 is further configured to: before receiving the first HTTP request sent by the UE, receive a TCP connection establishment request sent by the UE, where the destination IP address in the IP header corresponding to the TCP connection establishment request is The IP address of the server; the sending unit 12 is further configured to send a TCP connection establishment response to the UE to establish a TCP connection with the UE.
  • the processing unit 13 is further configured to determine that the server is a server that requires TLS access with one-way authentication before establishing a TLS channel with the server.
  • the processing unit 13 is configured to: when the server is a server that requires TLS access with one-way authentication, obtain the URI of the server according to the URI requested by the UE, when determining the server When the URI belongs to the first preset URI whitelist, the server is determined to be a server that requires TLS access with one-way authentication; wherein the first preset URI whitelist includes TLS access requiring one-way authentication.
  • the URI of the server or,
  • the server of the first preset IP address includes an IP address of a server that requires TLS access using one-way authentication.
  • the sending unit 12 is further configured to: when the processing unit 13 determines that the server is not a server that requires TLS access with one-way authentication, forward the TCP connection establishment request sent by the UE to the server; The sending unit 12 is further configured to forward the first HTTP request to the server after the receiving unit 11 receives the first HTTP request sent by the UE.
  • the receiving unit 11 is further configured to: before receiving the first HTTP request sent by the UE, receive a TCP connection establishment request sent by the UE, and the destination IP address in the IP header corresponding to the TCP connection establishment request The IP address of the proxy device; the sending unit 12 is further configured to send a TCP connection setup response message to the UE to establish a TCP connection with the UE.
  • the sending unit 12 is further configured to send the first HTTP request to the server through the TCP 80 port before the processing unit 13 establishes a TLS channel with the server; the receiving unit 11 And the method is further configured to receive a first redirect message sent by the server, where the first redirect message includes a URI requested by the UE, and the first redirect message is used to indicate that the UE establishes a TLS with the server. aisle;
  • the processing unit 13 is specifically configured to: establish the TLS channel with the server according to the first redirect message;
  • the processing unit 13 is further configured to determine the server when the TLS channel is successfully established with the server before the sending unit 12 sends the first HTTP request to the server through the TLS channel between the proxy device and the server.
  • the processing unit 13 is further configured to: when the TLS channel fails to be established with the server, determine that the server is a server that requires TLS access for mutual authentication; and the sending unit 12 is further configured to forward to the UE.
  • the first redirect message sent by the server; the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the processing unit 13 is further configured to send the service to the sending unit 12 through the TCP80 port.
  • the receiving unit 11 determines that the server is not a server that requires TLS access with one-way authentication and requires the server to be used.
  • a server for TLS access of the two-way authentication the receiving unit 11 is further configured to: receive data requested by the first HTTP request sent by the server; and the TLS of the mutual authentication is that the UE and the server authenticate each other The TLS; the sending unit 12 is further configured to send, by using the service processing device, the data requested by the first HTTP request to the UE.
  • the processing unit 13 is further configured to determine that the server is a server that requires TLS access with one-way authentication before establishing a TLS channel with the server. .
  • the processing unit 13 when determining that the server is a server that requires TLS access with one-way authentication, is specifically configured to: obtain a URI of the server according to the URI requested by the UE; when determining the server When the URI belongs to the first preset URI whitelist, the server is determined to be a server that requires TLS access with one-way authentication; wherein the first preset URI whitelist includes TLS access requiring one-way authentication.
  • the URI of the server or,
  • the first preset IP address white list includes an IP address of a server that requires TLS access using one-way authentication.
  • the server is not a server that requires TLS access with one-way authentication
  • the sending unit 12 is further configured to: when the processing unit 13 determines that the server is a server that requires TLS access with two-way authentication, send a second redirect message to the UE; the processing unit 13 is further configured to establish with the server a TCP connection based on a TCP 443 port; the second redirect message includes a URI requested by the UE, and the second redirect message is used to indicate that the UE establishes a TLS channel with the server;
  • the processing unit 13 is further configured to: when determining that the server is not a server that requires TLS access with mutual authentication, establish a TCP connection based on the TCP 80 port with the server; the sending unit 12 is further configured to forward the first to the server HTTP request;
  • the TLS of the mutual authentication is that the UE and the server authenticate each other. TLS.
  • the processing unit 13 when determining that the server is a server that requires TLS access with mutual authentication, is specifically configured to: obtain a URI of the server according to the URI requested by the UE; and determine a URI of the server when determining
  • the server is determined to be a server that requires TLS access with mutual authentication; wherein the second preset URI whitelist includes a URI of a server that requires TLS access with mutual authentication. ;or,
  • the IP address of the server Determining, according to the URI requested by the UE, the IP address of the server; when determining that the IP address of the server belongs to the second preset IP address whitelist, determining that the server is a TLS access requiring two-way authentication The server; the second preset IP address whitelist includes an IP address of a server that requires TLS access using two-way authentication.
  • the receiving unit 11 is further configured to: before receiving the first HTTP request sent by the UE, receive a transparent connection request sent by the UE, where the transparent connection request includes an FQDN of the server a TCP 443 port number, the transparent connection request is used to indicate that the UE needs to request to connect to the server corresponding to the FQDN through a TCP 443 port;
  • the sending unit 12 is further configured to send a third redirect message to the UE according to the transparent connection request, where the third redirect message includes an FQDN and a TCP80 port number of the server, where the third redirect message is used by The UE is instructed to connect to the server corresponding to the FQDN through a TCP port to obtain data corresponding to the URI requested by the UE.
  • the processing unit 13 is further configured to: before the sending unit 12 sends the third redirect message to the UE according to the transparent connection request, determine, according to the FQDN of the server, that the server is a TLS that requires one-way authentication. Access to the server.
  • the processing unit 13 is configured to: when determining, according to the FQDN of the server, that the server is a TLS access server that requires one-way authentication, when determining that the FQDN of the server belongs to the first preset FQDN white When the list is determined, the server is determined to be a server that requires TLS access with one-way authentication; wherein the first preset FQDN white list includes an FQDN of a server that requires TLS access using one-way authentication; or
  • the URI of the server Determining, according to the FQDN of the server, the URI of the server; when determining that the URI of the server belongs to the first preset URI whitelist, determining that the server is a server that requires TLS access for one-way authentication, where The first preset URI white list includes the requirement to adopt The URI of the TLS-accessed server for one-way authentication; or,
  • the first preset IP address whitelist includes an IP address of a server that requires TLS access using one-way authentication.
  • the server is not a server that requires TLS access with one-way authentication
  • the processing unit 13 is further configured to: when determining that the server is a server that requires TLS access with mutual authentication, establish a TCP connection based on a TCP 443 port with the server; the sending unit 12 is further configured to send the first to the UE. Determining a message, the first determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port to obtain data corresponding to the URI requested by the UE;
  • the processing unit 13 is further configured to: when determining that the server is not a server that requires TLS access with mutual authentication, establish a TCP-port-based TCP connection with the server; the sending unit 12 is further configured to send the fourth weight to the UE.
  • the fourth redirect message includes an FQDN and a TCP80 port number of the server, where the fourth redirect message is used to indicate that the UE connects to a server corresponding to the FQDN through a TCP80 port to obtain the UE.
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the processing unit 13 is configured to determine, when determining that the server is a server that requires TLS access with two-way authentication, when determining that the FQDN of the server belongs to the second preset FQDN whitelist.
  • the second preset URI whitelist includes a URI of a server that requires TLS access using two-way authentication; or
  • the server is determined to be a server that requires two-way authentication for TLS access, wherein the second preset IP address whitelist includes two-way authentication. IP address of the server to which TLS accesses.
  • the processing unit 13 is further configured to: generate a URI of the server according to an FQDN of the server before establishing a TLS channel with the server; and generate a second HTTP request according to a URI of the server, the second The HTTP request includes the URI of the server;
  • the sending unit 12 is further configured to send the second HTTP request to the server by using a TCP80 port.
  • the receiving unit 11 is further configured to receive a fifth redirect message sent by the server, where the fifth redirect message includes a URI of the server, and the fifth redirect message is used to indicate the UE and the server Establish a TLS channel;
  • the processing unit 13 is specifically configured to: establish the TLS channel with the server according to the fifth redirect message;
  • the processing unit 13 is further configured to: before the sending unit 12 sends the third redirect message to the UE according to the transparent connection request, when the TLS channel is successfully established with the server, determining that the server is required to adopt one-way authentication TLS access server.
  • the processing unit 13 is further configured to: when the TLS channel fails to be established with the server, determine that the server is a server that requires TLS access with mutual authentication;
  • the sending unit 12 is further configured to send, to the UE, a second determining message, where the second determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port; wherein the two-way authenticated TLS TLS for the UE and the server to authenticate each other.
  • the processing unit 13 is further configured to: after the sending unit 12 sends the second HTTP request to the server, if the receiving unit 11 does not receive the fifth redirect message sent by the server, determine the server A server that does not require TLS access with one-way authentication and a server that requires TLS access with two-way authentication;
  • the receiving unit 11 is further configured to receive a third determining message sent by the server, where the TLS of the mutual authentication is a TLS that the UE and the server authenticate each other;
  • the sending unit 12 is further configured to send a sixth redirection message to the UE, where the sixth redirection message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP80 port to obtain the UE requesting The data corresponding to the URI.
  • the proxy device when the proxy device establishes a TCP connection based on a TCP8443 port with the UE;
  • the processing unit 13 is further configured to establish a TLS channel with the UE after the proxy device establishes a TCP connection based on the TCP8443 port with the UE.
  • the proxy device in this embodiment may be used to implement the technical solution executed by the proxy device in the following method embodiments.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • the above receiving unit 11 may be a receiver or a transceiver
  • the above sending unit 12 is a transmitter or a transceiver
  • the receiving unit 11 and the transmitting unit 12 may be integrated to form a transceiver unit, corresponding to hardware implementation.
  • the above processing unit 13 may be embedded in or independent of the processor of the proxy device in hardware, or may be stored in the memory of the proxy device in software, so that the processor invokes the operations corresponding to the above respective units.
  • the processor can be a central processing unit (English: Central Processing Unit, CPU for short), a microprocessor, a single chip microcomputer, and the like. Please refer to FIG. 2.
  • FIG. 2 Please refer to FIG. 2.
  • the proxy device of this embodiment includes a receiver 21, a transmitter 22, and a processor 23.
  • the proxy device may also include a common component such as an input/output device, and the embodiment of the present invention is not limited thereto.
  • Receiver 21, transmitter 22 and processor 23 may be used to perform the operations performed by the proxy device in the method embodiments of the present invention described below.
  • the proxy device may further include: a memory 24, wherein the memory 24 stores a set of program codes, and the processor 23 is configured to call the program code stored in the memory 24 for performing the following method embodiments of the present invention. The action performed by the proxy device.
  • the proxy device shown in FIG. 2 can be used to perform the technical solution executed by the proxy device in the following method embodiments of the present invention, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 3 is a schematic structural diagram of Embodiment 1 of a UE according to the present invention.
  • the UE in this embodiment may include: a sending unit 31 and a receiving unit 32.
  • the sending unit 31 is configured to send an HTTP request, where the HTTP is sent.
  • the request includes the URI of the UE request
  • the receiving unit 32 is configured to receive, by the service processing device, data sent by the proxy device, where the data is received by the proxy device by the server corresponding to the URI after receiving the HTTP request
  • the TLS channel sent between the proxy device and the server.
  • the sending unit 31 is further configured to send an HTTP request.
  • the destination IP address in the IP header corresponding to the TCP connection establishment request is an IP address of the server;
  • the receiving unit 32 is further configured to receive a TCP connection establishment response sent by the proxy device to establish a TCP connection with the proxy device.
  • the sending unit 31 is further configured to send a TCP connection establishment request to the proxy device before sending the HTTP request, where the destination IP address in the IP header corresponding to the TCP connection establishment request is The IP address of the proxy device;
  • the receiving unit 32 is further configured to receive a TCP connection establishment response sent by the proxy device to establish a TCP connection with the proxy device.
  • the sending unit 31 when sending the HTTP request, is specifically configured to: when the URI indicates that the UE does not need to establish a TLS channel with the server, send an HTTP request to the proxy device.
  • the sending unit 31 is further configured to: after the UE establishes a TCP connection with the proxy device, send a transparent to the proxy device when the URI indicates that the UE needs to establish a TLS channel with the server.
  • a connection request the transparent connection request includes an FDQN and a TCP 443 port number of the server, where the transparent connection request is used to indicate that the UE requests to connect to the server corresponding to the FQDN;
  • the receiving unit 32 is further configured to receive a redirect message sent by the proxy device, where the redirect message includes an FQDN and a TCP80 port number of the server, where the redirect message is used to indicate that the UE is connected to the server through a TCP80 port. Determining, by the server corresponding to the FQDN, the data corresponding to the URI requested by the UE;
  • the sending unit 31 is specifically configured to: send the HTTP request according to the redirect message.
  • the UE in this embodiment may further include: a processing unit 33, where the processing unit 33 is configured to use the UE and the After the proxy device establishes a TCP connection based on the TCP8443 port, a TLS channel is established with the proxy device.
  • the UE in this embodiment may be used to implement the technical solution executed by the UE in the following method embodiments.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • the above sending unit 31 is a transmitter or a transceiver
  • the above receiving unit 32 may be a receiver or a transceiver
  • the transmitting unit 31 and the receiving unit 32 may be integrated to form a transceiver unit, which is implemented as a transceiver corresponding to hardware.
  • the above processing unit 33 may be embedded in or independent of the processor of the UE in hardware, or may be stored in the memory of the UE in software, so that the processor invokes the operations corresponding to the above units.
  • the processor can be a central processing unit (English: Central Processing Unit, CPU for short), a microprocessor, a single chip microcomputer, and the like. Please refer to FIG. 4. FIG. 4. FIG.
  • the UE in this embodiment includes a transmitter 41, a receiver 42, and a processor 43.
  • the UE may also include a common component such as an input and output device, and the embodiment of the present invention is not limited herein.
  • Transmitter 41, receiver 42 and processor 43 may be used to perform the operations performed by the UE in the method embodiments of the present invention described below.
  • the UE may further include: a memory 44, wherein the memory 44 stores a set of program codes, and the processor 43 is configured to call the program code stored in the memory 44 for executing the proxy in the following method embodiment of the present invention. The action performed by the device.
  • the UE shown in FIG. 4 may be used to perform the technical solution executed by the UE in the following method embodiments of the present invention, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 5 is a flowchart of Embodiment 1 of a data transmission method according to the present invention. As shown in FIG. 5, the method in this embodiment may include:
  • the proxy device receives a first HTTP request sent by the UE, where the first HTTP request includes a Uniform Resource Identifier (English: Uniform Resource Identifier, URI for short).
  • a Uniform Resource Identifier English: Uniform Resource Identifier, URI for short.
  • the server when the UE needs to request service data from the server, the server is a server that requires establishing a TLS channel, and the UE sends an HTTP request, where the first HTTP request includes a URI requested by the UE, and correspondingly, the proxy device receives The first HTTP request sent by the UE. It should be noted that the proxy device receives the first HTTP request sent by the UE.
  • the proxy device sends the TLS channel between the server and the server corresponding to the URI requested by the UE to the server.
  • the first HTTP request is a server that requires TLS access with one-way authentication
  • the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication
  • the TLS channel exists between the proxy device and the server, where the TLS of the one-way authentication is only TLS that authenticates the server, and then the proxy device sends the received first HTTP request through the TLS channel between the proxy device and the server. Give it to the server.
  • the service processing device for example, the VAS
  • the service processing device can be in the transmission path between the proxy device and the UE
  • the first HTTP request sent by the UE passes through the service processing device, so the service processing device can obtain the first An HTTP request, and determining, according to the first HTTP request, a type of resource data (eg, video, audio, picture, etc.) corresponding to the URI requested by the UE.
  • a type of resource data eg, video, audio, picture, etc.
  • the proxy device sends the first HTTP request to the service proxy device and the server respectively after receiving the first HTTP request sent by the UE; Alternatively, the proxy device sends the first HTTP request to the service proxy device, and after the service proxy device sends an acknowledgement message to the proxy device, the proxy device sends the first HTTP request to the server, where the service proxy device Determining, according to the first HTTP request, a type of resource data corresponding to the URI requested by the UE; or determining, by the proxy device, a type of resource data corresponding to the URI requested by the UE according to the first HTTP request, and then the type notification Process the device for the service.
  • the proxy device receives data, and the data is sent by the server through the TLS channel after receiving the first HTTP request.
  • the server determines the data requested by the first HTTP request, and then passes the data requested by the first HTTP request.
  • the TLS channel is sent to the proxy device, and accordingly, the proxy device can receive the data sent by the server through the TLS channel.
  • the data is plaintext data before entering the TLS channel and after the TLS channel, and the data transmission process in the TLS channel is encrypted data.
  • the server may send the data to the proxy device in the first acknowledgment response message, where the first acknowledgment response message may further include the indication information of the 200 OK, where the indication information of the 200 OK is used to indicate that the UE has successfully obtained the data.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device after the proxy device obtains the data, the data is sent to the UE by the service processing device, and the data is plaintext data, so the service processing device can obtain the data sent by the proxy device to the UE, and then the data can be The obtained data is subjected to a service processing operation, such as a VAS operation, to solve the problem in the prior art; wherein the proxy device may carry the data in the second acknowledgment response message and send the data to the UE through the network device, where the second Confirmation
  • the response message may also include an indication of 200 OK.
  • the proxy device sends the data to the UE by using the network device, including: the proxy device sends the data to the network device, and the network device performs a service processing operation, such as a VAS operation, on the data, and then performs a service processing operation.
  • the data is sent to the UE, where the proxy device can send the second acknowledgment response message in the data carrying to the network device, where the network device can carry the data after the service processing operation in the third acknowledgment response message and send the
  • the UE, the second acknowledgment response message and the third acknowledgment response message may further include indication information of 200 OK.
  • the proxy device receives the first HTTP request that is sent by the UE and includes the URI requested by the UE.
  • the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication, Transmitting, by the proxy device, the first HTTP request to the server by using a TLS channel between the server corresponding to the URI requested by the UE; and then receiving data, the data is that the server passes the TLS channel after receiving the first HTTP request Transmitted; the data is sent to the UE by the service processing device.
  • the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server.
  • the data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • the method further includes: the proxy device establishes a TCP connection based on the TCP 443 port with the server, and establishes the foregoing TLS aisle. Since the proxy device establishes a TCP connection based on the TCP 443 port and establishes a TLS channel, the proxy device can send the first HTTP request sent by the UE to the server through the TLS channel, and implement the proxy device and the server. End-to-end transmission between.
  • FIG. 6 is a flowchart of Embodiment 2 of a data transmission method according to the present invention. As shown in FIG. 6, the method in this embodiment may include:
  • the UE sends a first HTTP request, where the first HTTP request includes a URI requested by the UE.
  • the UE receives, by the service processing device, data sent by the proxy device, where the data is sent by the proxy device to the TLS channel between the proxy device and the server after receiving the first HTTP request by the proxy device. of.
  • the server when the UE needs to request service data from the server, the server is a server that requires establishing a TLS channel, and the UE sends a first HTTP request, where the first HTTP request includes a URI requested by the UE. It should be noted that the UE sends the first HTTP request, and the first HTTP request is forwarded to the server via the proxy device.
  • the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication
  • the TLS channel exists between the proxy device and the server, and the TLS for the one-way authentication is to authenticate only the server.
  • the proxy device after receiving the first HTTP request sent by the UE, the proxy device sends the received first HTTP request to the server through the TLS channel between the proxy device and the server.
  • the server determines the data requested by the first HTTP request according to the first HTTP request, and then sends the data to the proxy device through the TLS channel.
  • the proxy device obtains the data, the data is sent to the UE by the service processing device, and the data is plaintext data. Therefore, the service processing device can obtain the data sent by the proxy device to the UE, and then the service can be performed on the acquired data. Processing operations, such as VAS operations, solve the problems in the prior art.
  • the UE sends a first HTTP request, where the first HTTP request includes a URI requested by the UE, and receives, by the service processing device, data sent by the proxy device, where the data is received by the proxy device.
  • the server corresponding to the URI is sent through the TLS channel between the proxy device and the server after receiving the HTTP request. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server.
  • the data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • FIG. 7 is a flowchart of Embodiment 3 of a data transmission method according to the present invention. As shown in FIG. 7, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request.
  • the server when the UE needs to request service data from the server, the server is a server that requires establishing a TLS channel, and the UE sends a TCP connection establishment request, and the destination IP address in the IP header corresponding to the TCP connection establishment request is the server.
  • the IP address indicates that the UE needs to establish a TCP connection with the server.
  • the TCP connection establishment request is that the UE needs to send to the server, but the TCP connection establishment request first passes through the proxy device after being sent by the UE, and the proxy device does not forward to the server after receiving the TCP connection establishment request, but performs S302.
  • the TCP connection setup request is what the UE wants to send to the server, it is essentially sent to the proxy device.
  • the proxy device sends a TCP connection setup response to the UE.
  • the proxy device receives a TCP connection establishment request sent by the UE through port 80, and the proxy device determines, according to the TCP connection establishment request, that the UE needs to establish a TCP connection with the server, and the proxy device replaces the server with the UE.
  • Sending the TCP connection establishment response the UE receives the TCP connection establishment response sent by the proxy device to establish a TCP connection between the proxy device and the UE, and the UE considers that the TCP between the UE and the server is established. connection.
  • the UE sends a first HTTP request.
  • the UE may send a first HTTP request through the established TCP connection, where the TCP connection is a TCP 80 port-based TCP connection, so the UE sends the first HTTP request to the proxy device through the TCP port.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines whether the server requested by the UE is a server that requires TLS access with one-way authentication, and the TLS of the one-way authentication is only The server performs TLS authentication.
  • S305-S308 is performed.
  • the proxy device stores a first preset URI whitelist, where the first preset URI whitelist includes a URI of a server that requires TLS access using one-way authentication, and the proxy device Obtaining the URI of the user request from the first HTTP request, and obtaining the URI of the server according to the URI requested by the user (for example, if the URI requested by the user is http://www.baidu.com/xxx, the URI of the server is Http://www.baidu.com/), and then determining whether the URI of the server belongs to the first preset URI white list, and when the proxy device determines that the URI of the server belongs to the first preset URI white list, the proxy The device determines that the server is a server that requires TLS access with one-way authentication. When the proxy device determines that the URI of the server does not belong to the first preset URI whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication
  • the proxy device stores a first preset IP address.
  • a whitelist the first preset IP address whitelist includes an IP address of a server that requires TLS access using one-way authentication
  • the proxy device may obtain a URI requested by the UE from the first HTTP request, and then request according to the UE.
  • the URI obtains the IP address of the server, and then determines whether the IP address of the server belongs to the whitelist of the first preset IP address.
  • the proxy device determines that the IP address of the server belongs to the whitelist of the first preset IP address
  • the The proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the IP address of the server does not belong to the first preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the proxy device stores a first preset IP address whitelist, where the first preset IP address whitelist includes an IP address of a server that requires TLS access with one-way authentication.
  • the proxy device may obtain the IP address of the server from the IP header corresponding to the TCP connection establishment request, and then determine whether the IP address of the server belongs to the first preset IP address whitelist, and when the proxy device determines the IP address of the server When the whitelist belongs to the first preset IP address, the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the IP address of the server does not belong to the first preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the proxy device establishes a TCP connection based on the TCP443 port with the server, and establishes a TLS channel.
  • the proxy device when the proxy device determines that the server is a server that requires TLS access with one-way authentication, the proxy device establishes a TCP connection based on the TCP 443 port with the server, and establishes a TLS channel.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device receives the first HTTP request sent by the UE, and then the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and then The first HTTP request passes the TLS The channel is forwarded to the server; the data sent by the server through the TLS channel is received; and the data is sent to the UE by the service processing device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server. The data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • FIG. 8 is a flowchart of Embodiment 4 of the data transmission method of the present invention. As shown in FIG. 8, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines whether the server that the UE requests to establish a TCP connection is a server that requires TLS access with one-way authentication, and the TLS of the one-way authentication is TLS that authenticates only this server.
  • S403 is performed.
  • the proxy device stores a first preset IP address whitelist, where the first preset IP address whitelist includes an IP address of a server that requires TLS access using one-way authentication
  • the proxy device may obtain the IP address of the server from the IP header corresponding to the TCP connection establishment request, and then determine whether the IP address of the server belongs to the whitelist of the first preset IP address, and when the proxy device determines that the IP address of the server belongs to The first preset IP address is whitelisted, and the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the IP address of the server does not belong to the first preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the proxy device establishes a TCP connection based on the TCP 443 port with the server and establishes a TLS channel.
  • the proxy device sends a TCP connection setup response to the UE.
  • the UE sends a first HTTP request.
  • the UE may send the first HTTP request to the proxy device by using the established TCP connection.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device after the proxy device receives the TCP connection establishment request sent by the UE, the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and then the proxy device receives the first sent by the UE.
  • the requested data Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server.
  • the data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • the proxy device determines whether the server is a server that requires TLS access with one-way authentication
  • the proxy device determines that the server is not a server that requires TLS access with one-way authentication
  • the proxy device The server forwards the TCP connection establishment request sent by the UE, so that the UE establishes a TCP connection with the server, and the proxy device does not execute the above-mentioned S304-S308 or the above-mentioned S402-S408; then the UE and the server
  • the proxy device performs a forwarding action in accordance with the flow of the prior art.
  • the feasible implementation manner that the proxy device determines that the server is not a server that requires TLS access with one-way authentication may be: the proxy device determines whether the server is a server that requires TLS access with mutual authentication, the mutual authentication.
  • TLS is the TLS for which the UE and the server authenticate each other; when the proxy device determines that the server is a server that requires TLS access with mutual authentication, then the proxy device sends a TCP connection establishment request sent by the UE to the server.
  • the proxy device can perform a forwarding operation.
  • the proxy device may determine whether the server is a server that requires TLS access using one-way authentication, when the proxy device determines the server When a server that requires unidirectional authentication for TLS access is required, the proxy device performs S304-S308 or S402-S408 as described above, when the proxy device determines that the server is not a server that requires TLS access with one-way authentication, the proxy device forwards the TCP connection establishment request sent by the UE to the server. Then, according to the process of the prior art (for example, the UE establishes an 80-port TCP connection with the server, and the UE sends a first HTTP request to the server through port 80), and the proxy device can perform a forwarding operation.
  • the proxy device may determine, according to the URI of the server and the second preset URI whitelist, whether the server is a server that requires TLS access using two-way authentication, specifically, the proxy device.
  • Storing a second preset URI white list, the second preset URI white list includes a URI of a server that requires TLS access using two-way authentication, and the proxy device obtains the URI requested by the UE from the first HTTP request, and then Obtaining a URI of the server according to the URI requested by the UE, and then determining whether the URI of the server belongs to the second preset URI whitelist, and when the proxy device determines that the URI of the server belongs to the second preset URI whitelist, the proxy The device determines that the server is a server that requires TLS access with two-way authentication. When the proxy device determines that the URI of the server does not belong to the second preset URI whitelist, the proxy device determines that the server is not a server that requires TLS access for
  • the proxy device may determine, according to the IP address of the server and the second preset IP address whitelist, whether the server is a server that requires TLS access with mutual authentication, specifically, the server The second preset IP address white name is stored in the proxy device.
  • the second preset IP address white list includes an IP address of a server that requires TLS access using two-way authentication, and the proxy device may obtain the URI requested by the UE from the first HTTP request, and then according to the URI requested by the UE. Obtaining an IP address of the server, and determining whether the IP address of the server belongs to the second preset IP address whitelist.
  • the proxy device When the proxy device determines that the IP address of the server belongs to the second preset IP address whitelist, the proxy device Make sure the server is a server that requires TLS access with mutual authentication. When the proxy device determines that the IP address of the server does not belong to the second preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access for mutual authentication.
  • the proxy device may determine, according to the IP address of the server and the second preset IP address whitelist, whether the server is a server that requires TLS access with mutual authentication, specifically, the server The proxy device stores a second preset IP address whitelist, where the second preset IP address whitelist includes an IP address of a server that requires TLS access using two-way authentication, and the proxy device can obtain a corresponding request from the TCP connection establishment request. Obtaining an IP address of the server in the IP header, and determining whether the IP address of the server belongs to the second preset IP address whitelist.
  • the proxy device determines that the IP address of the server belongs to the whitelist of the second preset IP address.
  • the proxy device determines that the server is a server that requires TLS access for mutual authentication.
  • the proxy device determines that the IP address of the server does not belong to the second preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access for mutual authentication.
  • FIG. 9 is a flowchart of Embodiment 5 of the data transmission method of the present invention. As shown in FIG. 9, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request.
  • the proxy device sends a TCP connection setup response to the UE.
  • the UE sends a first HTTP request to the proxy device.
  • the proxy device sends the first HTTP request to the server through the TCP80 port.
  • the proxy device after the proxy device receives the first HTTP request sent by the UE, the proxy device attempts to connect to the server, that is, the proxy device sends the first HTTP request to the server through the TCP80 port.
  • the server sends a first redirect message to the proxy device.
  • the proxy device establishes a TCP connection based on the TCP 443 port and establishes a TLS channel with the server.
  • the server receives the first HTTP request sent by the proxy device through the TCP port, and when the server is a server that requires TLS access with two-way authentication or a server that requires TLS access with one-way authentication.
  • the server sends a first redirect message to the proxy device, where the first redirect message includes a URI requested by the UE, where the first redirect message is used to indicate that the UE establishes a TLS channel with the server, where When the URI included in the redirect message includes https://, the first redirection message is used to indicate that the UE establishes a TLS channel with the server; accordingly, after the proxy device receives the first redirect message, According to the first redirect message, a TCP connection based on the TCP 443 port is established with the server and a TLS channel for performing one-way authentication only to the server is established.
  • the proxy device may determine that the server is a server that requires TLS access with one-way authentication, and the proxy device performs S507-S509.
  • the proxy device may determine that the failure is caused by the server being a server requiring TLS access using two-way authentication, that is, determining that the server is a TLS access requiring two-way authentication.
  • the server then forwards the first redirect message to the UE, and then the UE performs a prior art process according to the first redirect message (eg, the UE establishes a TCP port based on port 443 with the server, and then establishes a bidirectional
  • the authenticated TLS channel and then the UE sends a first HTTP request to the server, the first HTTP request including the URI requested by the UE, and the proxy device can perform a forwarding operation.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data to the proxy device through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device receives the first HTTP request sent by the UE, and then the proxy device establishes a TCP connection based on the TCP 443 port number and establishes a TLS relationship with the server that requires the establishment of the TLS channel.
  • the first An HTTP request is forwarded to the server through the TLS channel; receiving data sent by the server through the TLS channel; and transmitting the data to the UE through the service processing device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server.
  • the data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • the proxy device determines that the server does not require one-way authentication.
  • a server for TLS access and a server requiring TLS access using two-way authentication that is, after the proxy device sends the first HTTP request to the server through the TCP port, the server may send the first HTTP request to the proxy device.
  • the server may send the data to the proxy device, and may also send a 200 OK indication message to the proxy device, where the indication information of the 200 OK is used to indicate that the data has been obtained.
  • the data corresponding to the URI requested by the UE after receiving the data, the proxy device may determine that the server is neither a server that requires TLS access with one-way authentication nor a server that requires TLS access with two-way authentication, and then the UE And the server operates according to the prior art process (for example, the UE establishes an 80-port TCP connection with the server). The UE then sends an HTTP request) to the server via the port 80, the proxy device can perform forwarding operations.
  • FIG. 10 is a flowchart of Embodiment 6 of the data transmission method of the present invention. As shown in FIG. 10, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request to the proxy device.
  • the proxy device sends a TCP connection setup response to the UE.
  • the UE may send a TCP connection establishment request to the proxy device according to an address format of the proxy device configured by the user agent of the UE.
  • the UE sends a TCP connection request to the proxy device through the TCP8080 port, where the TCP connection establishment request corresponds.
  • the destination IP address in the IP header is the IP address of the proxy device, indicating that the UE needs to establish a TCP connection based on the TCP8080 port with the proxy device, and the proxy device receives the TCP connection establishment request sent by the UE, The proxy device determines, according to the TCP connection establishment request, that the UE needs to establish a TCP connection with the proxy device, and the proxy device sends the TCP connection establishment response to the UE, and the UE receives the TCP connection establishment response sent by the proxy device to establish the proxy.
  • the UE sends a TCP connection request to the proxy device through the TCP8443 port, where the TCP connection establishment request corresponds to the IP header.
  • the destination IP address is the IP address of the proxy device, indicating that the UE needs to establish a TCP connection based on the TCP8443 port with the proxy device, and the proxy device receives the TCP connection establishment request sent by the UE, and the proxy device establishes a request according to the TCP connection.
  • the proxy device Determining that the UE needs to establish a TCP connection with the proxy device, the proxy device sends the TCP connection setup response to the UE, and the UE receives the TCP connection setup response sent by the proxy device to establish a basis between the proxy device and the UE. TCP connection to the TCP8443 port.
  • the UE may also establish a TLS channel with the proxy device.
  • the UE sends a first HTTP request to the proxy device.
  • the UE may determine, according to the URI input by the user (that is, the URI requested by the UE in the foregoing embodiments), whether the UE needs to establish a TLS with the server corresponding to the URI.
  • the channel when the UE determines that the URI input by the user indicates that the UE does not need to establish a TLS channel with the server, the UE sends a first HTTP request to the proxy device, where the first HTTP request includes a URI requested by the UE.
  • the UE If the UE establishes a TCP connection based on the TCP8080 port with the proxy device, the UE sends a first HTTP request to the proxy device through the TCP8080 port; if the UE establishes a TCP connection based on the TCP8443 port with the proxy device, the UE passes the TCP8443. The port sends a first HTTP request to the proxy device.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines whether the server corresponding to the URI requested by the UE is a server that requires TLS access with one-way authentication, and the TLS of the one-way authentication is TLS that authenticates only this server.
  • Agent device When it is determined that the server is a server that requires TLS access using one-way authentication, S605-S608 is executed.
  • the proxy device may obtain the URI requested by the UE from the first HTTP request, acquire the URI of the server according to the URI requested by the UE, and then determine, according to the URI of the server, whether the server is a TLS access with one-way authentication.
  • the proxy device may obtain the URI requested by the UE from the first HTTP request, and then according to the URI.
  • the URI requested by the UE obtains the IP address of the server, or obtains the IP address of the server according to the IP packet header of the IP layer corresponding to the first HTTP request message, and determines whether the server is one-way according to the IP address of the server.
  • the TLS access server refer to the feasible implementation manner in the method S3 of the method of the present invention, and details are not described herein again.
  • the proxy device establishes a TCP connection based on the TCP 443 port and establishes a TLS channel with the server.
  • the proxy device when the proxy device determines that the server is a server that requires TLS access with one-way authentication, the proxy device establishes a TCP connection based on the TCP 443 port and establishes a TLS channel, and the server uses the proxy device. As the UE, end-to-end transmissions to meet server requirements.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device receives the first HTTP request sent by the UE, and then the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and then The first HTTP request is forwarded to the server through the TLS channel; the data sent by the server through the TLS channel is received; and the data is sent to the UE by the service processing device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server. The data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations. Work.
  • the proxy device determines that the server is a server that requires TLS access with two-way authentication, the proxy device sends a second redirect message to the UE, where the second redirect message includes the UE The requested URI, the second redirect message is used to indicate that the UE establishes a TLS channel with the server, and the proxy device establishes a TCP connection based on the TCP 443 port with the server.
  • the UE sends a CONNECT command to the proxy device, where the CONNECT command includes the FQDN of the server and the TCP 443 port number, and then the proxy device establishes a basis with the server.
  • the proxy device sends a 200 CONNECT established message to the UE, and then the UE establishes a TLS channel with the server, and then the UE and the server operate according to the prior art process, and the proxy device performs a forwarding action. In this scenario, the proxy device does not execute S604-S608.
  • the server determines that the server is a TLS access server that requires two-way authentication, refer to the implementation solution described in the foregoing embodiment, and details are not described herein again.
  • the proxy device determines that the server is not a TLS access server requiring one-way authentication and a server that requires TLS access using two-way authentication, the proxy device establishes a TCP connection based on the TCP 80 port with the server, and The first HTTP request is forwarded to the server, and then the UE and the server operate according to the flow of the prior art, and the proxy device performs a forwarding action. In this scenario, the proxy device does not execute S604-S608.
  • the server determines that the server is not required to use the TLS access of the two-way authentication and the server that requires the TLS access of the two-way authentication, refer to the implementation scheme described in the foregoing embodiment, and details are not described herein again.
  • FIG. 11 is a flowchart of Embodiment 7 of a data transmission method according to the present invention. As shown in FIG. 11, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request to the proxy device.
  • the proxy device sends a TCP connection setup response to the UE.
  • the UE sends a first HTTP request to the proxy device.
  • the proxy device sends the first HTTP request to the server through the TCP80 port.
  • the proxy device after the proxy device receives the first HTTP request sent by the UE, the proxy device attempts to connect to the server, that is, the proxy device sends the first HTTP request to the server through the TCP80 port.
  • the server sends a first redirect message to the proxy device.
  • the proxy device establishes a TCP connection based on the TCP 443 port with the server and establishes a TLS channel.
  • the server receives the first HTTP request sent by the proxy device through the TCP port, and when the server is a server that requires TLS access with two-way authentication or a server that requires TLS access with one-way authentication.
  • the server sends a first redirect message to the proxy device, where the first redirect message includes a URI requested by the UE, where the first redirect message is used to indicate that the UE establishes a TLS channel with the server, where When the URI included in the redirect message includes https://, the first redirection message is used to indicate that the UE establishes a TLS channel with the server; accordingly, after the proxy device receives the first redirect message, According to the first redirect message, a TCP connection based on the TCP 443 port and a TLS channel for performing one-way authentication only to the server are established with the server.
  • the proxy device may determine that the server is a server that requires TLS access with one-way authentication, and the proxy device performs S707-S709.
  • the proxy device may determine that the failure is caused by the server being a server requiring TLS access using two-way authentication, that is, determining that the server is a TLS access requiring two-way authentication.
  • the server then forwards the first redirect message to the UE.
  • the UE sends a CONNECT command to the proxy device, where the CONNECT command includes the FQDN of the server and the TCP 443 port number, and the proxy device sends 200 CONNECT to the UE.
  • the proxy device performs a forwarding action.
  • the proxy device does not execute S707-S709.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data to the proxy device through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device receives the first HTTP request sent by the UE, and then the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and then The first HTTP request is forwarded to the server through the TLS channel; the data sent by the server through the TLS channel is received; and the data is sent to the UE by the service processing device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the HTTP request, which satisfies both the end-to-end secure transmission required by the server and the data requested by the server and sent by the server. It can be acquired by the network device, and thus can perform business processing operations, such as VAS operations.
  • the proxy device determines that the server does not require one-way authentication.
  • a server for TLS access and a server requiring TLS access using two-way authentication that is, after the proxy device sends the first HTTP request to the server through the TCP port, the server may send the first HTTP request to the proxy device.
  • the server may send the data to the proxy device, and may also send a 200 OK indication message to the proxy device, where the indication information of the 200 OK is used to indicate that the data has been obtained.
  • the proxy device may determine that the server is neither a server requiring TLS access using one-way authentication nor a server requiring TLS access using two-way authentication, the server and the server The proxy device establishes a TCP connection based on a TCP port, and then the UE and the server follow the prior art Cheng operation, the proxy device can perform forwarding operations. In this scenario, S705-S709 is not executed.
  • FIG. 12 is a flowchart of Embodiment 8 of the data transmission method of the present invention. As shown in FIG. 12, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request to the proxy device.
  • the proxy device sends a TCP connection setup response to the UE.
  • the UE sends a transparent connection request to the proxy device.
  • the UE may determine, according to the URI input by the user (that is, the URI requested by the UE in the foregoing embodiments), whether the UE needs to establish a TLS with the server corresponding to the URI.
  • the UE when the UE determines that the URI input by the user indicates that the UE needs to establish a TLS channel with the server, the UE sends a transparent connection request to the proxy device, and the transparent connection request may be a CONNECT command, where the transparent connection request includes the server FQDN and TCP 443 port number, the transparent connection request is used to indicate that the UE needs to request to connect to the server corresponding to the FQDN through the TCP 443 port.
  • the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device sends a third redirect message to the UE.
  • the proxy device may further determine, according to the FQDN of the server, whether the server is a server that requires TLS access with one-way authentication.
  • the proxy device sends the third redirect message to the UE, where the third redirect message includes the FQDN and TCP80 of the server. a port number, the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain data corresponding to the URI requested by the UE.
  • the specific implementation manner of determining, by the proxy device, whether the server is a TLS access server that requires one-way authentication according to the FQDN of the server is as follows.
  • the proxy device stores a first preset FQDN whitelist, where the first preset FQDN whitelist includes an FQDN of a server that requires TLS access using one-way authentication, and the proxy device Obtaining the FQDN of the server from the transparent connection request, and determining whether the FQDN of the server belongs to the first preset FQDN whitelist, and when the proxy device determines that the FQDN of the server belongs to the first preset FQDN whitelist, the proxy device It is determined that the server is a server that requires TLS access with one-way authentication. When the proxy device determines that the FQDN of the server does not belong to the first preset FQDN whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the proxy device stores a first preset URI white name.
  • the first preset URI white list includes a URI of a server that requires TLS access using one-way authentication
  • the proxy device obtains the FQDN of the server from the transparent connection request, and then obtains the URI of the server according to the FQDN, and then Determining whether the URI of the server belongs to the first preset URI white list.
  • the proxy device determines that the URI of the server belongs to the first preset URI white list
  • the proxy device determines that the server is a TLS interface that requires one-way authentication.
  • the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the proxy device stores a first preset IP address whitelist, where the first preset IP address whitelist includes an IP address of a server that requires TLS access with one-way authentication.
  • the proxy device may obtain the FQDN of the server from the transparent connection request, and then obtain the IP address of the server according to the FQDN of the server, and then determine whether the IP address of the server belongs to the whitelist of the first preset IP address, when the proxy device If it is determined that the IP address of the server belongs to the white list of the first preset IP address, the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the IP address of the server does not belong to the first preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access with one-way authentication.
  • the UE sends a first HTTP request to the proxy device.
  • the UE may send an HTTP request to the proxy device through the established TCP connection, where the first HTTP request includes the URI requested by the UE.
  • the proxy device establishes a TCP connection based on the TCP 443 port and establishes a TLS channel with the server.
  • the S807 may be performed after S804, that is, after the proxy device determines that the server is a server that requires TLS access with one-way authentication, the proxy device performs S807, where the execution order of S807 and S805 and S806 is not divided. Successive.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data to the proxy device through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device after the proxy device establishes a TCP connection with the UE, the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and receives the first HTTP request sent by the UE, and then the first The HTTP request is forwarded to the server through the TLS channel; the data sent by the server through the TLS channel is received; and the data is sent to the UE by the service processing device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server. The data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • the TLS of the mutual authentication is a TLS for the UE and the server to authenticate each other.
  • the proxy device establishes a TCP connection based on the TCP 443 port with the server, and the proxy device sends a first determining message to the UE, where the first determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port, where The first determining message may CONNECTOR the message, and then the UE performs a prior art process according to the first determining message (eg, the UE establishes a TLS secure channel with the server, and the UE sends an HTTP request to the server through the TLS secure channel, the HTTP request. Including the URI requested by the user, etc.), the proxy device can perform the forwarding operation. In this scenario, S804-S810 is not executed.
  • the proxy device after performing S803, when the proxy device determines that the server is not a server that requires TLS access with two-way authentication and a TLS access server that requires one-way authentication, the proxy device establishes a TCP-based server with the server. a TCP connection of the port, the proxy device sends a fourth redirect message to the UE, the fourth redirect message includes an FQDN of the server and a TCP80 port number, where the fourth redirect message is used to indicate that the UE is connected to the TCP port through
  • the server corresponding to the FQDN acquires data corresponding to the URI requested by the UE, and then the UE performs a prior art process according to the fourth redirect message.
  • the UE sends an HTTP request to the server, where the HTTP request includes a URI requested by the UE. , etc.), the proxy device can perform forwarding operations. In this scenario, S804-S810 is not executed.
  • the specific implementation manner of determining, by the proxy device, whether the server is a server that requires TLS access using mutual authentication according to the FQDN of the server is as follows.
  • the proxy device stores a second preset FQDN whitelist, where the second preset FQDN whitelist includes an FQDN of a server that requires TLS access using two-way authentication, and the proxy device Obtaining the FQDN of the server in the transparent connection request, and determining whether the FQDN of the server belongs to the second preset FQDN whitelist.
  • the proxy device determines This server is a server that requires TLS access with mutual authentication.
  • the proxy device determines that the FQDN of the server does not belong to the second preset FQDN whitelist, the proxy device determines that the server is not a server that requires TLS access for mutual authentication.
  • the proxy device stores a second preset URI whitelist, where the second preset URI whitelist includes a URI of a server that requires TLS access using two-way authentication, and the proxy device Obtaining the FQDN of the server in the transparent connection request, and then obtaining the URI of the server according to the FQDN, and then determining whether the URI of the server belongs to the second preset URI white list, and when the proxy device determines that the URI of the server belongs to the second pre- With the URI whitelist, the proxy device determines that the server is a server that requires TLS access for mutual authentication. When the proxy device determines that the URI of the server does not belong to the second preset URI whitelist, the proxy device determines that the server is not a server that requires TLS access for mutual authentication.
  • the proxy device stores a second preset IP address whitelist, where the second preset IP address whitelist includes an IP address of a server that requires TLS access using mutual authentication.
  • the proxy device may obtain the FQDN of the server from the transparent connection request, and then obtain the IP address of the server according to the FQDN of the server, and then determine whether the IP address of the server belongs to the second preset IP address whitelist, when the proxy device determines If the IP address of the server belongs to the white list of the second preset IP address, the proxy device determines that the server is a server that requires TLS access with one-way authentication.
  • the proxy device determines that the IP address of the server does not belong to the second preset IP address whitelist, the proxy device determines that the server is not a server that requires TLS access for mutual authentication.
  • FIG. 13 is a flowchart of Embodiment 9 of the data transmission method of the present invention. As shown in FIG. 13, the method in this embodiment may include:
  • the UE sends a TCP connection establishment request to the proxy device.
  • the proxy device sends a TCP connection setup response to the UE.
  • the URI input by the user to the UE indicates that the UE needs to establish a TLS connection with the server.
  • the UE sends a transparent connection request to the proxy device.
  • the proxy device generates a URI of the server according to the FQDN of the server.
  • the proxy device generates a second HTTP request according to the URI of the server.
  • the proxy device sends the second HTTP request to the server by using a TCP port.
  • the proxy device attempts to connect to the server. Specifically, the proxy device obtains the FQDN of the server from the transparent connection request, generates a URI of the server according to the FQDN, and generates a second according to the URI of the server. HTTP request. The proxy device then sends the second HTTP request to the server over the TCP 80 port.
  • the server sends a fifth redirect message to the proxy device.
  • the proxy device establishes a TCP connection and a TLS channel based on the TCP 443 port with the server.
  • the server after the server receives the second HTTP request sent by the proxy device through the TCP80 port, when the server is a server that requires TLS access with two-way authentication or a server that requires TLS access with one-way authentication.
  • the server sends a fifth redirect message to the proxy device, where the fifth redirect message includes a URI of the server, where the fifth redirect message is used to indicate that the UE establishes a TLS channel with the server; accordingly, the proxy device After receiving the fifth redirect message, according to the fifth redirect message, establish a TCP connection based on the TCP 443 port number and establish a TLS channel with the server.
  • the proxy device may determine that the server is a server that requires TLS access with one-way authentication, and execute S909-S913.
  • the proxy device may determine that the server is a server that requires TLS access with mutual authentication, and then the proxy device sends a second determining message to the UE, where The second determining message may be a 200 CONNECT established message, where the second determining message is used to indicate that the UE is connected to the server corresponding to the FQDN through a TCP 443 port, and then the UE establishes a TLS channel with the server according to the second determining message.
  • the UE and the server operate according to the prior art process, and the proxy device can perform a forwarding operation. In this scenario, the proxy device does not execute. S909-S913.
  • the proxy device sends a third redirect message to the UE.
  • the proxy device after the proxy device successfully establishes a TLS channel with the server, the proxy device sends a third redirect message to the UE.
  • the third redirect message includes the FQDN and the TCP80 port number of the server, and the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain the UE.
  • the data corresponding to the requested URI includes the FQDN and the TCP80 port number of the server, and the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain the UE.
  • the data corresponding to the requested URI includes the FQDN and the TCP80 port number of the server, and the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain the UE.
  • the data corresponding to the requested URI includes the FQDN and the TCP80 port number of the server, and the third redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain the UE.
  • the UE sends a first HTTP request to the proxy device.
  • the proxy device sends the first HTTP request to the server by using the TLS.
  • the server sends data to the proxy device through the TLS channel.
  • the proxy device sends the data to the UE by using a service processing device.
  • the proxy device after the proxy device establishes a TCP connection with the UE, the proxy device establishes a TCP connection and establishes a TLS channel with the server that requires the establishment of the TLS channel, and receives the first HTTP request sent by the UE, and then the first The HTTP request is forwarded to the server through the TLS channel; the data sent by the server through the TLS channel is received; and the data is sent to the UE through the service network device. Since the TLS channel is established between the proxy device and the server, the UE can obtain the data in the server through the first HTTP request, which satisfies both the end-to-end secure transmission required by the server and the UE request sent by the server. The data can be obtained by the network device, and thus can perform business processing operations, such as VAS operations.
  • the proxy device determines that the server does not require one-way authentication.
  • a server for TLS access and a server requiring TLS access using two-way authentication that is, after the proxy device sends the first HTTP request to the server through the TCP 80 port, the server may send a third determination message to the proxy device instead of Sending a fifth redirect message to the proxy device, where the third determining message may be a 200 OK message, and after receiving the third determining message, the proxy device may determine that the proxy device and the server are not
  • the TLS channel needs to be established, that is, the server is neither a server that requires TLS access with one-way authentication nor a server that requires TLS access with two-way authentication; then the proxy device sends a sixth redirect message to the UE, The sixth redirect message is used to indicate that the UE is connected to the server corresponding to the FQDN through the TCP80 port to obtain data
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage medium includes: read-only memory (English: Read-Only Memory, ROM for short), random access memory (English: Random Access Memory, RAM), disk or A variety of media such as optical discs that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供一种数据传输方法和设备,此方法包括:代理设备接收UE发送的HTTP请求,HTTP请求包括UE请求的URI;当所述UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,通过所述代理设备与URI对应的服务器之间的TLS通道向服务器发送HTTP请求;接收服务器在接收到第一HTTP请求后通过TLS通道发送的数据;通过业务处理设备向UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。

Description

数据传输方法和设备 技术领域
本发明实施例涉及通信技术领域,尤其涉及一种数据传输方法和设备。
背景技术
应用层之上的服务(Over The Top Serve)是一种内容或服务建构在基础电信服务之上从而不需要网络运营商额外支持的应用,OTT服务具体可以是音频业务和视频业务,逐渐包含了基于互联网的多种内容和服务。在现有的很多OTT应用中,用户一般都是通过在用户设备(英文:User Equipment,简称:UE)浏览器中输入统一资源定位符(英文:Uniform Resource Locator,简称:URI)地址来向OTT服务器请求业务,中间网络节点,例如增值服务(英文:Value Added Service,简称:VAS)功能实体,可以获取UE向OTT服务器发送的业务请求,以及获取UE从OTT服务器下载的未加密数据,进而对这些数据进行处理,例如进行网页过滤、视频加速、音频加速、深度包检测(英文:Deep Packet Inspection,简称:DPI)、合法监听(英文:Lawful Interception,简称:LI)、用户行为分析等增值业务处理操作。
然而,现有的一些OTT服务器要求UE以基于安全套接层的超文本传输协议(英文:Hyper Text Transfer Protocol over Secure Socket Layer,简称:HTTPS)方式接入该OTT服务器,即要求在UE与OTT服务器之间建立一个安全传输层协议(英文:Transport Layer Security,简称:TLS),以实现数据的端到端安全传输,因此UE与OTT服务器之间交互的数据都是由TLS进行加密保护的,所以中间网络节点无法获取这些数据,进而无法进行VAS操作。
发明内容
本发明实施例提供一种数据传输方法和设备,用于实现位于UE与服务器之间的业务处理设备可以进行业务处理操作,如VAS操作。
第一方面,本发明实施例提供一种代理设备,包括:
接收单元,用于接收UE发送的第一超文本传输协议(英文:Hyper Text Transfer Protocol,简称:HTTP)请求,所述第一HTTP请求包括所述UE请求的URI;
发送单元,用于当所述UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,通过所述代理设备与所述服务器之间的TLS通道向所述服务器发送所述第一HTTP请求;所述单向认证的TLS为仅对所述服务器进行认证的TLS;
所述接收单元,还用于接收数据,所述数据是所述服务器在接收到所述第一HTTP请求后通过所述TLS通道发送的;
所述发送单元,还用于通过业务处理设备向所述UE发送所述数据。
在第一方面的第一种可能的实现方式中,还包括:
处理单元,用于与所述服务器建立基于传输控制协议(英文:Transmission Control Protocol,简称:TCP)443端口的TCP连接;以及与所述服务器建立所述TLS通道。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的互联网协议(英文:Internet Protocol,简称:IP)头中的目的IP地址为所述服务器的IP地址;
所述发送单元,还用于向所述UE发送TCP连接建立响应,以与所述UE建立TCP连接。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述处理单元还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述处理单元在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI,当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI 白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
根据所述UE请求的URI获取所述服务器的IP地址,或者,从所述TCP连接建立请求对应的IP包头中获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第一方面的第三种可能的实现方式或第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述发送单元还用于,当所述处理单元确定所述服务器不是要求采用单向认证的TLS接入的服务器时,向所述服务器转发所述UE发送的所述TCP连接建立请求;
所述发送单元还用于在所述接收单元接收所述UE发送的所述第一HTTP请求之后,向所述服务器转发所述第一HTTP请求。
结合第一方面的第一种可能的实现方式,在第一方面的第六种可能的实现方式中,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
所述发送单元,还用于向所述UE发送TCP连接建立响应消息,以与所述UE建立TCP连接。
结合第一方面的第二种可能的实现方式或第一方面的第六种可能的实现方式,在第一方面的第七种可能的实现方式中,所述发送单元还用于在所述处理单元与所述服务器建立TLS通道之前,通过TCP80端口向所述服务器发送所述第一HTTP请求;
所述接收单元还用于,接收所述服务器发送的第一重定向消息,所述第一重定向消息包括所述UE请求的URI,所述第一重定向消息用于指示所述UE与所述服务器建立TLS通道;
所述处理单元在与所述服务器建立TLS通道时,具体用于:根据所述第一重定向消息,与所述服务器建立所述TLS通道;
所述处理单元还用于在所述发送单元通过所述代理设备与所述服务器之间的TLS通道向服务器发送所述第一HTTP请求之前,当与所述服务器成功建立TLS通道时,确定所述服务器为要求采用单向认证的TLS接 入的服务器。
结合第一方面的第七种可能的实现方式,在第一方面的第八种可能的实现方式中,所述处理单元还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;
所述发送单元还用于,向所述UE转发所述服务器发送的所述第一重定向消息;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第一方面的第七种可能的实现方式,在第一方面的第九种可能的实现方式中,所述处理单元还用于在所述发送单元通过TCP80端口向所述服务器发送所述第一HTTP请求之后,若所述接收单元未接收到所述服务器发送的第一重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;
所述接收单元还用于,接收所述服务器发送的所述第一HTTP请求所请求的数据;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
所述发送单元,还用于通过所述业务处理设备向所述UE发送所述第一HTTP请求所请求的数据。
结合第一方面的第六种可能的实现方式,在第一方面的第十种可能的实现方式中,所述处理单元还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第一方面的第十种可能的实现方式,在第一方面的第十一种可能的实现方式中,所述处理单元在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第一方面的第十种可能的实现方式或第一方面的第十一种可能的实现方式,在第一方面的第十二种可能的实现方式中,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
所述发送单元还用于,当所述处理单元确定所述服务器为要求采用双向认证的TLS接入的服务器时,向所述UE发送第二重定向消息;所述处理单元还用于与所述服务器建立基于TCP443端口的TCP连接;所述第二重定向消息包括所述UE请求的URI,所述第二重定向消息用于指示所述UE与所述服务器建立TLS通道;
所述处理单元还用于,当确定所述服务器不是要求采用双向认证的TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;所述发送单元还用于向所述服务器转发所述第一HTTP请求;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第一方面的第十二种可能的实现方式,在第一方面的第十三种可能的实现方式中,所述处理单元在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
所述根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
结合第一方面的第六种可能的实现方式,在第一方面的第十四种可能的实现方式中,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的透明连接请求,所述透明连接请求包括所述服务器的正式域名(英文:Fully Qualified Domain Name,简称:FQDN)和TCP443端口号,所述透明连接请求用于指示所述UE需要请求通过TCP443端口连接到所述FQDN对应的所述服务器;
所述发送单元,还用于根据所述透明连接请求向所述UE发送第三重 定向消息,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
结合第一方面的第十四种可能的实现方式,在第一方面的第十五种可能的实现方式中,所述处理单元还用于在所述发送单元根据所述透明连接请求向所述UE发送第三重定向消息之前,根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第一方面的第十五种可能的实现方式,在第一方面的第十六种可能的实现方式中,所述处理单元在根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:当确定所述服务器的FQDN属于第一预设FQDN白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN;或者,
根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第一方面的第十五种可能的实现方式或第一方面的第十六种可能的实现方式,在第一方面的第十七种可能的实现方式中,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
所述处理单元还用于,当确定所述服务器为要求采用双向认证的TLS接入的服务器时,与所述服务器建立基于TCP443端口的TCP连接;所述发送单元还用于向所述UE发送第一确定消息,所述第一确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据;
所述处理单元还用于,当确定所述服务器不为要求采用双向认证的 TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;所述发送单元还用于向所述UE发送第四重定向消息,所述第四重定向消息包括所述服务器的FQDN和TCP80端口号,所述第四重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的服务器以获取所述UE请求的URI所对应的数据;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第一方面的第十七种可能的实现方式,在第一方面的第十八种可能的实现方式中,所述处理单元在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:当确定所述服务器的FQDN属于第二预设FQDN白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN;或者,
根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
结合第一方面的第十四种可能的实现方式,在第一方面的第十九种可能的实现方式中,所述处理单元还用于在与所述服务器建立TLS通道之前,根据所述服务器的FQDN生成所述服务器的URI;以及根据所述服务器的URI生成第二HTTP请求,所述第二HTTP请求包括所述服务器的URI;
所述发送单元,还用于通过TCP80端口向所述服务器发送所述第二HTTP请求;
所述接收单元,还用于接收所述服务器发送的第五重定向消息,所述第五重定向消息包括所述服务器的URI,所述第五重定向消息用于指示所 述UE与所述服务器建立TLS通道;
所述处理单元在与所述服务器建立TLS通道时,具体用于:根据所述第五重定向消息,与所述服务器建立所述TLS通道;
所述处理单元还用于在所述发送单元根据所述透明连接请求向所述UE发送第三重定向消息之前,当与所述服务器建立TLS通道成功时,确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第一方面的第十九种可能的实现方式,在第一方面的第二十种可能的实现方式中,所述处理单元还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;
所述发送单元还用于向所述UE发送第二确定消息,所述第二确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第一方面的第十九种可能的实现方式,在第一方面的第二十一种可能的实现方式中,所述处理单元还用于在所述发送单元向所述服务器发送所述第二HTTP请求之后,若所述接收单元未接收到所述服务器发送的第五重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;
所述接收单元还用于接收所述服务器发送的第三确定消息;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
所述发送单元还用于向所述UE发送第六重定向消息,所述第六重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
结合第一方面的第六种至第二十一种可能的实现方式中的任意一种,在第一方面的第二十二种可能的实现方式中,当所述代理设备与所述UE建立基于TCP8443端口的TCP连接时;
所述处理单元还用于在所述代理设备与UE建立基于TCP8443端口的TCP连接之后,与所述UE建立TLS通道。
第二方面,本发明实施例提供一种UE,包括:
发送单元,用于发送HTTP请求,所述HTTP请求包括所述UE请求 的URI;
接收单元,用于通过业务处理设备接收代理设备发送的数据,所述数据为所述代理设备接收所述URI对应的服务器在接收到所述HTTP请求后通过所述代理设备与所述服务器之间的TLS通道发送的。
在第二方面的第一种可能的实现方式中,所述发送单元还用于在发送HTTP请求之前,发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述服务器的IP地址;
所述接收单元还用于接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
在第二方面的第二种可能的实现方式中,所述发送单元还用于在发送HTTP请求之前,向所述代理设备发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
所述接收单元还用于接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述发送单元在发送HTTP请求时,具体用于:当所述URI指示所述UE不需要与所述服务器建立TLS通道时,向所述代理设备发送HTTP请求。
结合第二方面的第二种可能的实现方式,在第二方面的第四种可能的实现方式中,所述发送单元还用于,在所述UE与所述代理设备建立TCP连接之后,当所述URI指示所述UE需要与所述服务器建立TLS通道时,向所述代理设备发送透明连接请求,所述透明连接请求包括所述服务器的正式域名FDQN和TCP443端口号,所述透明连接请求用于指示所述UE请求连接到所述FQDN对应的所述服务器;
所述接收单元还用于接收所述代理设备发送的重定向消息,所述重定向消息包括所述服务器的FQDN和TCP80端口号,所述重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN所对应的服务器以获取所述UE请求的URI对应的数据;
所述发送单元在发送HTTP请求时,具体用于:根据所述重定向消息发送所述HTTP请求。
结合第二方面的第二种可能的实现方式或第二方面的第三种可能的实现方式或第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述UE还包括:
处理单元,用于在所述UE与所述代理设备建立基于TCP8443端口的TCP连接之后,与所述代理设备建立TLS通道。
第三方面,本发明实施例提供一种数据传输方法,包括:
代理设备接收UE发送的第一HTTP请求,所述第一HTTP请求包括所述UE请求的URI;
当所述UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,所述代理设备通过所述代理设备与所述服务器之间的TLS通道向所述服务器发送所述第一HTTP请求;所述单向认证的TLS为仅对所述服务器进行认证的TLS;
所述代理设备接收数据,所述数据是所述服务器在接收到所述第一HTTP请求后通过所述TLS通道发送的;
所述代理设备通过业务处理设备向所述UE发送所述数据。
在第三方面的第一种可能的实现方式中,还包括:
所述代理设备与所述服务器建立基于TCP443端口的TCP连接;
所述代理设备与所述服务器建立所述TLS通道。
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
所述代理设备接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述服务器的IP地址;
所述代理设备向所述UE发送TCP连接建立响应,以与所述UE建立TCP连接。
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述代理设备与所述服务器建立TLS通道之前,还包括:
所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第三方面的第三种可能的实现方式,在第三方面的第四种可能的 实现方式中,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
所述代理设备根据所述UE请求的URI获取所述服务器的URI,当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
所述代理设备根据所述UE请求的URI获取所述服务器的IP地址,或者,所述代理设备从所述TCP连接建立请求对应的IP包头中获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第三方面的第三种可能的实现方式或第三方面的第四种可能的实现方式,在第三方面的第五种可能的实现方式中,还包括:当所述代理设备确定所述服务器不是要求采用单向认证的TLS接入的服务器时,所述代理设备向所述服务器转发所述UE发送的所述TCP连接建立请求;
所述代理设备接收所述UE发送的所述第一HTTP请求之后,还包括:所述代理设备向所述服务器转发所述第一HTTP请求。
结合第三方面的第一种可能的实现方式,在第三方面的第六种可能的实现方式中,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
所述代理设备接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
所述代理设备向所述UE发送TCP连接建立响应消息,以与所述UE建立TCP连接。
结合第三方面的第二种可能的实现方式或第三方面的第六种可能的实现方式,在第三方面的第七种可能的实现方式中,所述代理设备与所述服务器建立TLS通道之前,还包括:所述代理设备通过TCP80端口向所述服务器发送所述第一HTTP请求;所述代理设备接收所述服务器发送的第一重定向消息,所述第一重定向消息包括所述UE请求的URI,所述第 一重定向消息用于指示所述UE与所述服务器建立TLS通道;
所述代理设备与所述服务器建立TLS通道,包括:所述代理设备根据所述第一重定向消息,与所述服务器建立所述TLS通道;
所述代理设备通过所述代理设备与所述服务器之间的TLS通道向服务器发送所述第一HTTP请求之前,还包括:
当所述代理设备与所述服务器成功建立TLS通道时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第三方面的第七种可能的实现方式,在第三方面的第八种可能的实现方式中,还包括:当所述代理设备与所述服务器建立TLS通道失败时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,以及所述代理设备向所述UE转发所述服务器发送的所述第一重定向消息;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第三方面的第七种可能的实现方式,在第三方面的第九种可能的实现方式中,所述代理设备通过TCP80端口向所述服务器发送所述第一HTTP请求之后,还包括:若所述代理设备未接收到所述服务器发送的第一重定向消息,则所述代理设备确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,以及所述代理设备接收所述服务器发送的所述第一HTTP请求所请求的数据;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
所述代理设备通过所述业务处理设备向所述UE发送所述第一HTTP请求所请求的数据。
结合第三方面的第六种可能的实现方式,在第三方面的第十种可能的实现方式中,所述代理设备与所述服务器建立TLS通道之前,还包括:
所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第三方面的第十种可能的实现方式,在第三方面的第十一种可能的实现方式中,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
所述代理设备根据所述UE请求的URI获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代 理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
所述代理设备根据所述UE请求的URI获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第三方面的第十种可能的实现方式或第三方面的第十一种可能的实现方式,在第三方面的第十二种可能的实现方式中,当所述服务器不为要求采用单向认证的TLS接入的服务器时,还包括:
当所述代理设备确定所述服务器是要求采用双向认证的TLS接入的服务器时,所述代理设备向所述UE发送第二重定向消息,以及所述代理设备与所述服务器建立基于TCP443端口的TCP连接;所述第二重定向消息包括所述UE请求的URI,所述第二重定向消息用于指示所述UE与所述服务器建立TLS通道;
当所述代理设备确定所述服务器不是要求采用双向认证的TLS接入的服务器时,所述代理设备与服务器建立基于TCP80端口的TCP连接,以及向所述服务器转发所述第一HTTP请求;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第三方面的第十二种可能的实现方式,在第三方面的第十三种可能的实现方式中,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,包括:
所述代理设备根据所述UE请求的URI获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第二预设URI白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器;其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
所述代理设备根据所述UE请求的URI获取所述服务器的IP地址; 当所述代理设备确定所述服务器的IP地址属于第二预设IP地址白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器;所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
结合第三方面的第六种可能的实现方式,在第三方面的第十四种可能的实现方式中,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
所述代理设备接收所述UE发送的透明连接请求,所述透明连接请求包括所述服务器的FQDN和TCP443端口号,所述透明连接请求用于指示所述UE需要请求通过TCP443端口连接到所述FQDN对应的所述服务器;
所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
结合第三方面的第十四种可能的实现方式,在第三方面的第十五种可能的实现方式中,所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息之前,还包括:
所述代理设备根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第三方面的第十五种可能的实现方式,在第三方面的第十六种可能的实现方式中,所述代理设备根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
当所述代理设备确定所述服务器的FQDN属于第一预设FQDN白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN;或者,
所述代理设备根据所述服务器的FQDN获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的 URI;或者,
所述代理设备根据所述服务器的FQDN获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
结合第三方面的第十五种可能的实现方式或第三方面的第十六种可能的实现方式,在第三方面的第十七种可能的实现方式中,当所述服务器不为要求采用单向认证的TLS接入的服务器时,还包括:
当所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器时,所述代理设备与所述服务器建立基于TCP443端口的TCP连接,以及所述代理设备向所述UE发送第一确定消息,所述第一确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据;
当所述代理设备确定所述服务器不为要求采用双向认证的TLS接入的服务器时,所述代理设备与服务器建立基于TCP80端口的TCP连接,以及所述代理设备向所述UE发送第四重定向消息,所述第四重定向消息包括所述服务器的FQDN和TCP80端口号,所述第四重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的服务器以获取所述UE请求的URI所对应的数据;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第三方面的第十七种可能的实现方式,在第三方面的第十八种可能的实现方式中,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,包括:
当所述代理设备确定所述服务器的FQDN属于第二预设FQDN白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN;或者,
所述代理设备根据所述服务器的FQDN获取所述服务器的URI;当所 述代理设备确定所述服务器的URI属于第二预设URI白名单时,所述代理设备确定所述服务器确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
所述代理设备根据所述服务器的FQDN获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第二预设IP地址白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
结合第三方面的第十四种可能的实现方式,在第三方面的第十九种可能的实现方式中,所述代理设备与所述服务器建立TLS通道之前,还包括:
所述代理设备根据所述服务器的FQDN生成所述服务器的URI;
所述代理设备根据所述服务器的URI生成第二HTTP请求,所述第二HTTP请求包括所述服务器的URI;
所述代理设备通过TCP80端口向所述服务器发送所述第二HTTP请求;
所述代理设备接收所述服务器发送的第五重定向消息,所述第五重定向消息包括所述服务器的URI,所述第五重定向消息用于指示所述UE与所述服务器建立TLS通道;
所述代理设备与所述服务器建立TLS通道,包括:
所述代理设备根据所述第五重定向消息,与所述服务器建立所述TLS通道;
所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息之前,还包括:当所述代理设备与所述服务器建立TLS通道成功时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
结合第三方面的第十九种可能的实现方式,在第三方面的第二十种可能的实现方式中,还包括:
当所述代理设备与所述服务器建立TLS通道失败时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,以及所述代理设备向所述UE发送第二确定消息,所述第二确定消息用于指示所述UE通 过TCP443端口连接到所述FQDN对应的所述服务器;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
结合第三方面的第十九种可能的实现方式,在第三方面的第二十一种可能的实现方式中,所述代理设备向所述服务器发送所述第二HTTP请求之后,还包括:若所述代理设备未接收到所述服务器发送的第五重定向消息,则所述代理设备确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,以及所述代理设备接收所述服务器发送的第三确定消息;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
所述代理设备向所述UE发送第六重定向消息,所述第六重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
结合第三方面的第六种至第二十一种可能的实现方式中的任意一种,在第三方面的第二十二种可能的实现方式中,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述代理设备与UE建立基于TCP8443端口的TCP连接之后,还包括:
所述代理设备与所述UE建立TLS通道。
第四方面,本发明实施例提供一种数据传输方法,包括:
UE发送HTTP请求,所述HTTP请求包括所述UE请求的URI;
所述UE通过业务处理设备接收代理设备发送的数据,所述数据为所述代理设备接收所述URI对应的服务器在接收到所述HTTP请求后通过所述代理设备与所述服务器之间的TLS通道发送的。
在第四方面的第一种可能的实现方式中,所述UE发送HTTP请求之前,还包括:
所述UE发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述服务器的IP地址;
所述UE接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
在第四方面的第二种可能的实现方式中,所述UE发送HTTP请求之前,还包括:
所述UE向所述代理设备发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
所述UE接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述UE发送HTTP请求,包括:当所述URI指示所述UE不需要与所述服务器建立TLS通道时,所述UE向所述代理设备发送HTTP请求。
结合第四方面的第二种可能的实现方式,在第四方面的第四种可能的实现方式中,所述UE与所述代理设备建立TCP连接之后,还包括:当所述URI指示所述UE需要与所述服务器建立TLS通道时,所述UE向所述代理设备发送透明连接请求,所述透明连接请求包括所述服务器的正式域名FDQN和TCP443端口号,所述透明连接请求用于指示所述UE请求连接到所述FQDN对应的所述服务器;
所述UE接收所述代理设备发送的重定向消息,所述重定向消息包括所述服务器的FQDN和TCP80端口号,所述重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN所对应的服务器以获取所述UE请求的URI对应的数据;
所述UE发送HTTP请求,包括:所述UE根据所述重定向消息发送所述HTTP请求。
结合第四方面的第二种可能的实现方式或第四方面的第三种可能的实现方式或第四方面的第四种可能的实现方式,在第四方面的第五种可能的实现方式中,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述UE与所述代理设备建立基于TCP8443端口的TCP连接之后,还包括:
所述UE与所述代理设备建立TLS通道。
本发明实施例提供的数据传输方法和设备,代理设备接收UE发送的包括该UE请求的URI的第一HTTP请求;当该UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,通过该代理设备与该用户请求的URI对应的服务器之间的TLS通道向服务器发送该第一HTTP 请求;然后接收数据,该数据是该服务器在接收到该第一HTTP请求后通过该TLS通道发送的;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明代理设备实施例一的结构示意图;
图2为本发明代理设备实施例二的结构示意图;
图3为本发明UE实施例一的结构示意图;
图4为本发明UE实施例二的结构示意图;
图5为本发明数据传输方法实施例一的流程图;
图6为本发明数据传输方法实施例二的流程图;
图7为本发明数据传输方法实施例三的流程图;
图8为本发明数据传输方法实施例四的流程图;
图9为本发明数据传输方法实施例五的流程图;
图10为本发明数据传输方法实施例六的流程图;
图11为本发明数据传输方法实施例七的流程图;
图12为本发明数据传输方法实施例八的流程图;
图13为本发明数据传输方法实施例九的流程图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描 述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明下述各实施例中的代理设备,对服务器来说是UE的代理设备,服务器会将该代理设备作为UE;对UE来说是服务器的代理设备,UE会将该代理设备作为服务器。
图1为本发明代理设备实施例一的结构示意图,如图1所示,本实施例的代理设备可以包括:接收单元11和发送单元12;其中,接收单元11,用于接收UE发送的第一HTTP请求,所述第一HTTP请求包括所述UE请求的URI;发送单元12,用于当所述UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,通过所述代理设备与所述服务器之间的TLS通道向所述服务器发送所述第一HTTP请求;所述单向认证的TLS为仅对所述服务器进行认证的TLS;接收单元11,还用于接收数据,所述数据是所述服务器在接收到所述第一HTTP请求后通过所述TLS通道发送的;发送单元12,还用于通过业务处理设备向所述UE发送所述数据。
可选地,本实施例的代理设备还可以包括:处理单元13;其中,处理单元13,用于与所述服务器建立基于TCP443端口的TCP连接;以及与所述服务器建立所述TLS通道。
在一种情况下,接收单元11还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述服务器的IP地址;发送单元12,还用于向所述UE发送TCP连接建立响应,以与所述UE建立TCP连接。
可选地,处理单元13还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
可选地,处理单元13在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI,当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
根据所述UE请求的URI获取所述服务器的IP地址,或者,从所述 TCP连接建立请求对应的IP包头中获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
可选地,发送单元12还用于,当处理单元13确定所述服务器不是要求采用单向认证的TLS接入的服务器时,向所述服务器转发所述UE发送的所述TCP连接建立请求;发送单元12还用于在接收单元11接收所述UE发送的所述第一HTTP请求之后,向所述服务器转发所述第一HTTP请求。
在第二种情况下,接收单元11还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;发送单元12,还用于向所述UE发送TCP连接建立响应消息,以与所述UE建立TCP连接。
在上述第一种情况或第二种情况下,发送单元12还用于在处理单元13与所述服务器建立TLS通道之前,通过TCP80端口向所述服务器发送所述第一HTTP请求;接收单元11还用于,接收所述服务器发送的第一重定向消息,所述第一重定向消息包括所述UE请求的URI,所述第一重定向消息用于指示所述UE与所述服务器建立TLS通道;
处理单元13在与所述服务器建立TLS通道时,具体用于:根据所述第一重定向消息,与所述服务器建立所述TLS通道;
处理单元13还用于在发送单元12通过所述代理设备与所述服务器之间的TLS通道向服务器发送所述第一HTTP请求之前,当与所述服务器成功建立TLS通道时,确定所述服务器为要求采用单向认证的TLS接入的服务器。
可选地,处理单元13还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;发送单元12还用于,向所述UE转发所述服务器发送的所述第一重定向消息;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
可选地,处理单元13还用于在发送单元12通过TCP80端口向所述服 务器发送所述第一HTTP请求之后,若接收单元11未接收到所述服务器发送的第一重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;接收单元11还用于,接收所述服务器发送的所述第一HTTP请求所请求的数据;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;发送单元12,还用于通过所述业务处理设备向所述UE发送所述第一HTTP请求所请求的数据。
在上述第二种情况下,在一种可选的实现方案中,处理单元13还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
可选地,处理单元13在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
可选地,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
发送单元12还用于,当处理单元13确定所述服务器为要求采用双向认证的TLS接入的服务器时,向所述UE发送第二重定向消息;处理单元13还用于与所述服务器建立基于TCP443端口的TCP连接;所述第二重定向消息包括所述UE请求的URI,所述第二重定向消息用于指示所述UE与所述服务器建立TLS通道;
处理单元13还用于,当确定所述服务器不是要求采用双向认证的TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;发送单元12还用于向所述服务器转发所述第一HTTP请求;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的 TLS。
可选地,处理单元13在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
所述根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
在第二种可选的实现方式中,接收单元11还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的透明连接请求,所述透明连接请求包括所述服务器的FQDN和TCP443端口号,所述透明连接请求用于指示所述UE需要请求通过TCP443端口连接到所述FQDN对应的所述服务器;
发送单元12,还用于根据所述透明连接请求向所述UE发送第三重定向消息,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
可选地,处理单元13还用于在发送单元12根据所述透明连接请求向所述UE发送第三重定向消息之前,根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器。
可选地,处理单元13在根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:当确定所述服务器的FQDN属于第一预设FQDN白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN;或者,
根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设URI白名单包括要求采用 单向认证的TLS接入的服务器的URI;或者,
根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
可选地,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
处理单元13还用于,当确定所述服务器为要求采用双向认证的TLS接入的服务器时,与所述服务器建立基于TCP443端口的TCP连接;发送单元12还用于向所述UE发送第一确定消息,所述第一确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据;
处理单元13还用于,当确定所述服务器不为要求采用双向认证的TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;发送单元12还用于向所述UE发送第四重定向消息,所述第四重定向消息包括所述服务器的FQDN和TCP80端口号,所述第四重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的服务器以获取所述UE请求的URI所对应的数据;
其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
可选地,处理单元13在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:当确定所述服务器的FQDN属于第二预设FQDN白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN;或者,
根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服 务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
可选地,处理单元13还用于在与所述服务器建立TLS通道之前,根据所述服务器的FQDN生成所述服务器的URI;以及根据所述服务器的URI生成第二HTTP请求,所述第二HTTP请求包括所述服务器的URI;
发送单元12,还用于通过TCP80端口向所述服务器发送所述第二HTTP请求;
接收单元11,还用于接收所述服务器发送的第五重定向消息,所述第五重定向消息包括所述服务器的URI,所述第五重定向消息用于指示所述UE与所述服务器建立TLS通道;
处理单元13在与所述服务器建立TLS通道时,具体用于:根据所述第五重定向消息,与所述服务器建立所述TLS通道;
处理单元13还用于在发送单元12根据所述透明连接请求向所述UE发送第三重定向消息之前,当与所述服务器建立TLS通道成功时,确定所述服务器为要求采用单向认证的TLS接入的服务器。
可选地,处理单元13还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;
发送单元12还用于向所述UE发送第二确定消息,所述第二确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
可选地,处理单元13还用于在发送单元12向所述服务器发送所述第二HTTP请求之后,若接收单元11未接收到所述服务器发送的第五重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;
接收单元11还用于接收所述服务器发送的第三确定消息;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
发送单元12还用于向所述UE发送第六重定向消息,所述第六重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
可选地,当所述代理设备与所述UE建立基于TCP8443端口的TCP连接时;
处理单元13还用于在所述代理设备与UE建立基于TCP8443端口的TCP连接之后,与所述UE建立TLS通道。
本实施例的代理设备,可以用于执行下述各方法实施例中代理设备所执行的技术方案,其实现原理和技术效果类似,此处不再赘述。
在硬件实现上,以上接收单元11可以为接收器或收发器,以上发送单元12为发送器或收发器,且该接收单元11和发送单元12可以集成在一起构成收发单元,对应于硬件实现为收发机。以上处理单元13可以以硬件形式内嵌于或独立于代理设备的处理器中,也可以以软件形式存储于代理设备的存储器中,以便于处理器调用执行以上各个单元对应的操作。该处理器可以为中央处理单元(英文:Central Processing Unit,简称:CPU)、微处理器、单片机等。请参考图2,图2为本发明代理设备实施例二的结构示意图,如图2所示,本实施例的代理设备包括接收器21、发送器22和处理器23。当然,代理设备还可以包括输入输出装置等通用部件,本发明实施例在此不再任何限制。接收器21、发送器22和处理器23可以用于执行本发明下述方法实施例中代理设备所执行的操作。可选地,代理设备还可以包括:存储器24,其中,存储器24中存储一组程序代码,且处理器23用于调用存储器24中存储的程序代码,用于执行本发明下述方法实施例中代理设备所执行的操作。
需要说明的是,图2所示的代理设备可以用于执行本发明下述方法实施例中代理设备所执行的技术方案,其实现原理和技术效果类似,此处不再赘述。
图3为本发明UE实施例一的结构示意图,如图3所示,本实施例的UE可以包括:发送单元31和接收单元32;其中,发送单元31,用于发送HTTP请求,所述HTTP请求包括所述UE请求的URI;接收单元32,用于通过业务处理设备接收代理设备发送的数据,所述数据为所述代理设备接收所述URI对应的服务器在接收到所述HTTP请求后通过所述代理设备与所述服务器之间的TLS通道发送的。
在一种可选的实现方案中,发送单元31还用于在发送HTTP请求之 前,发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述服务器的IP地址;
接收单元32还用于接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
在另一种可选的实现方案中,发送单元31还用于在发送HTTP请求之前,向所述代理设备发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
接收单元32还用于接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
可选地,发送单元31在发送HTTP请求时,具体用于:当所述URI指示所述UE不需要与所述服务器建立TLS通道时,向所述代理设备发送HTTP请求。
可选地,发送单元31还用于,在所述UE与所述代理设备建立TCP连接之后,当所述URI指示所述UE需要与所述服务器建立TLS通道时,向所述代理设备发送透明连接请求,所述透明连接请求包括所述服务器的FDQN和TCP443端口号,所述透明连接请求用于指示所述UE请求连接到所述FQDN对应的所述服务器;
接收单元32还用于接收所述代理设备发送的重定向消息,所述重定向消息包括所述服务器的FQDN和TCP80端口号,所述重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN所对应的服务器以获取所述UE请求的URI对应的数据;
发送单元31在发送HTTP请求时,具体用于:根据所述重定向消息发送所述HTTP请求。
可选地,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,本实施例的UE还可以包括:处理单元33;其中,处理单元33,用于在所述UE与所述代理设备建立基于TCP8443端口的TCP连接之后,与所述代理设备建立TLS通道。
本实施例的UE,可以用于执行下述各方法实施例中UE所执行的技术方案,其实现原理和技术效果类似,此处不再赘述。
在硬件实现上,以上发送单元31为发送器或收发器,以上接收单元 32可以为接收器或收发器,且该发送单元31和接收单元32可以集成在一起构成收发单元,对应于硬件实现为收发机。以上处理单元33可以以硬件形式内嵌于或独立于UE的处理器中,也可以以软件形式存储于UE的存储器中,以便于处理器调用执行以上各个单元对应的操作。该处理器可以为中央处理单元(英文:Central Processing Unit,简称:CPU)、微处理器、单片机等。请参考图4,图4为本发明UE实施例二的结构示意图,如图4所示,本实施例的UE包括发送器41、接收器42和处理器43。当然,UE还可以包括输入输出装置等通用部件,本发明实施例在此不再任何限制。发送器41、接收器42和处理器43可以用于执行本发明下述方法实施例中UE所执行的操作。可选地,UE还可以包括:存储器44,其中,存储器44中存储一组程序代码,且处理器43用于调用存储器44中存储的程序代码,用于执行本发明下述方法实施例中代理设备所执行的操作。
需要说明的是,图4所示的UE可以用于执行本发明下述方法实施例中UE所执行的技术方案,其实现原理和技术效果类似,此处不再赘述。
图5为本发明数据传输方法实施例一的流程图,如图5所示,本实施例的方法可以包括:
S101、代理设备接收UE发送的第一HTTP请求,该第一HTTP请求包括该UE请求的统一资源标识符(英文:Uniform Resource Identifier,简称:URI)。
本实施例中,当UE需要向服务器请求业务数据时,该服务器为要求建立TLS通道的服务器,该UE发出HTTP请求,该第一HTTP请求包括该UE请求的URI,相应地,该代理设备接收该UE发送的第一HTTP请求。需要说明的是,该代理设备接收该UE发送的第一HTTP请求。
S102、当该UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,该代理设备通过该代理设备与该UE请求的URI对应的服务器之间的TLS通道向服务器发送该第一HTTP请求。
本实施例中,当该UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,该代理设备与该服务器之间存在TLS通道,其中,该单向认证的TLS为仅对该服务器进行认证的TLS,然后该代理设备将接收到的第一HTTP请求通过该代理设备与该服务器之间的TLS通道发 送给该服务器。
需要说明的是,若业务处理设备(例如VAS)可以处于该代理设备与该UE之间的传输路径上,UE发送的第一HTTP请求会经过业务处理设备,因此该业务处理设备可以获取该第一HTTP请求,并根据该第一HTTP请求确定该UE请求的URI所对应的资源数据的类型(例如视频、音频、图片等)。若业务处理设备未处于该代理设备与该UE之间的传输路径上,该代理设备接收到该UE发送的第一HTTP请求后,将该第一HTTP请求分别发送给该业务代理设备和服务器;或者,该代理设备将该第一HTTP请求发送给业务代理设备,业务代理设备向该代理设备发送一个确认消息后,该代理设备再将该第一HTTP请求发送给服务器;其中,该业务代理设备可以根据该第一HTTP请求确定该UE请求的URI所对应的资源数据的类型;或者,该代理设备根据该第一HTTP请求确定该UE请求的URI所对应的资源数据的类型,然后该类型通知给该业务处理设备。
S103、该代理设备接收数据,该数据是该服务器在接收到该第一HTTP请求后通过该TLS通道发送的。
本实施例中,该服务器通过该代理设备与该服务器之间的TLS通道接收到第一HTTP请求后,确定该第一HTTP请求所请求的数据,然后将该第一HTTP请求所请求的数据通过TLS通道发送给代理设备,相应地,该代理设备可以通过该TLS通道接收该服务器发送的该数据。需要说明的是,该数据在进入TLS通道前和出TLS通道后均为明文数据,该数据在TLS通道的传输过程是加密数据。
其中,该服务器可以将该数据携带在第一确认响应消息中发送给代理设备,该第一确认响应消息中还可以包括200OK的指示信息,该200OK的指示信息用于指示该UE已成功获取该数据。
S104、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,该代理设备获得该数据后,通过该业务处理设备向该UE发送该数据,该数据是明文数据,因此业务处理设备可以获取代理设备发送给该UE的该数据,进而可以对获取的该数据进行业务处理操作,如VAS操作,解决了现有技术中的问题;其中,该代理设备可以将该数据携带在第二确认响应消息中通过网络设备发送给该UE,该第二确认响 应消息还可以包括200OK的指示信息。可选地,该代理设备通过网络设备向该UE发送该数据,包括:该代理设备向该网络设备发送该数据,该网络设备对该数据执行业务处理操作,如VAS操作,然后将业务处理操作后的数据发送给该UE;其中,该代理设备可以将该数据携带中第二确认响应消息发送给网络设备,该网络设备可以将业务处理操作后的数据携带在第三确认响应消息中发送给该UE,该第二确认响应消息和第三确认响应消息中还可以包括200OK的指示信息。
本发明实施例提供的数据传输方法,代理设备接收UE发送的包括该UE请求的URI的第一HTTP请求;当该UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,通过该代理设备与该UE请求的URI对应的服务器之间的TLS通道向服务器发送该第一HTTP请求;然后接收数据,该数据是该服务器在接收到该第一HTTP请求后通过该TLS通道发送的;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,该代理设备通过该代理设备与服务器之间的TLS通道向服务器发送该第一HTTP请求之前,还包括:该代理设备与该服务器建立基于TCP443端口的TCP连接,以及建立上述的TLS通道。由于该代理设备与该服务器建立了基于TCP443端口的TCP连接和建立了TLS通道,后续该代理设备可以将UE发送的第一HTTP请求通过该TLS通道发送给该服务器,实现该代理设备与该服务器之间的端到端传输。
图6为本发明数据传输方法实施例二的流程图,如图6所示,本实施例的方法可以包括:
S201、UE发送第一HTTP请求,该第一HTTP请求包括该UE请求的URI。
S202、该UE通过业务处理设备接收该代理设备发送的数据,该数据为该代理设备接收该URI对应的服务器在接收到该第一HTTP请求后通过该代理设备与该服务器之间的TLS通道发送的。
本实施例中,当UE需要向服务器请求业务数据时,该服务器为要求建立TLS通道的服务器,该UE发出第一HTTP请求,该第一HTTP请求包括该UE请求的URI。需要说明的是,该UE发送该第一HTTP请求,该第一HTTP请求经由代理设备转发给该服务器。当该UE请求的URI对应的服务器为要求采用单向认证的TLS接入的服务器时,该代理设备与该服务器之间存在TLS通道,所述单向认证的TLS为仅对所述服务器进行认证的TLS,该代理设备接收到该UE发送的第一HTTP请求后将接收到的第一HTTP请求通过该代理设备与该服务器之间的TLS通道发送给该服务器。该服务器根据该第一HTTP请求,确定该第一HTTP请求所请求的数据,然后将该数据通过TLS通道发送给代理设备。该代理设备获得该数据后,通过该业务处理设备向该UE发送该数据,该数据是明文数据,因此业务处理设备可以获取代理设备发送给该UE的该数据,进而可以对获取的数据进行业务处理操作,如VAS操作,解决了现有技术中的问题。
本发明实施例提供的数据传输方法,UE发送第一HTTP请求,该第一HTTP请求包括该UE请求的URI,以及通过业务处理设备接收该代理设备发送的数据,该数据为该代理设备接收该URI对应的服务器在接收到该HTTP请求后通过该代理设备与该服务器之间的TLS通道发送的。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
图7为本发明数据传输方法实施例三的流程图,如图7所示,本实施例的方法可以包括:
S301、UE发送TCP连接建立请求。
本实施例中,当UE需要向服务器请求业务数据时,该服务器为要求建立TLS通道的服务器,该UE发送TCP连接建立请求,该TCP连接建立请求对应的IP头中的目的IP地址为该服务器的IP地址,表示该UE需要与该服务器建立TCP连接。该TCP连接建立请求是UE需要发送给服务器,但该TCP连接建立请求由该UE发出后首先会经过代理设备,该代理设备接收到该TCP连接建立请求后不向服务器转发,而是执行S302。 虽然该TCP连接建立请求是UE想要发送给服务器的,但实质上发送给了代理设备。
S302、该代理设备向该UE发送TCP连接建立响应。
本实施例中,该代理设备接收该UE通过80端口发送的TCP连接建立请求,该代理设备根据该TCP连接建立请求确定该UE需要与该服务器建立TCP连接,该代理设备会代替服务器向该UE发送该TCP连接建立响应,UE接收到该代理设备发送的TCP连接建立响应,以建立该代理设备与该UE之间的TCP连接,此时UE认为已建立好该UE与该服务器之间的TCP连接。
S303、该UE发送第一HTTP请求。
本实施例中,该UE可以通过上述建立的TCP连接发送第一HTTP请求,该TCP连接为基于TCP80端口的TCP连接,因此该UE通过TCP80端口发送第一HTTP请求至该代理设备。
S304、该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。
本实施例中,该代理设备接收到该UE发送的第一HTTP请求后,确定该UE请求的服务器是否为要求采用单向认证的TLS接入的服务器,该单向认证的TLS为仅对该服务器进行认证的TLS。当代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,执行S305-S308。
在第一种可行的实现方式中,该代理设备中存储有第一预设URI白名单,该第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI,该代理设备从第一HTTP请求中获取该用户请求的URI,并根据该用户请求的URI获取服务器的URI(例如:若用户请求的URI为http://www.baidu.com/xxx,则服务器的URI为http://www.baidu.com/),然后确定该服务器的URI是否属于第一预设URI白名单,当该代理设备确定该服务器的URI属于该第一预设URI白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的URI不属于该第一预设URI白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
在第二种可行的实现方式中,该代理设备中存储有第一预设IP地址 白名单,该第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址,该代理设备可以从第一HTTP请求中获取该UE请求的URI,然后根据该UE请求的URI获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第一预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第一预设IP地址白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第一预设IP地址白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
在第三种可行的实现方式中,该代理设备中存储有第一预设IP地址白名单,该第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址,该代理设备可以从该TCP连接建立请求对应的IP包头中获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第一预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第一预设IP地址白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第一预设IP地址白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
S305、该代理设备与该服务器建立基于TCP443端口的TCP连接,以及建立TLS通道。
本实施例中,该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,该代理设备与该服务器建立基于TCP443端口的TCP连接,以及建立TLS通道。
S306、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S307、该服务器通过该TLS通道发送数据。
S308、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S306-S308的具体实现过程可以参见本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备接收UE发送的第一HTTP请求,然后代理设备与要求建立TLS通道的该服务器之间建立TCP连接和建立TLS通道,再将该第一HTTP请求通过该TLS 通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
图8为本发明数据传输方法实施例四的流程图,如图8所示,本实施例的方法可以包括:
S401、UE发送TCP连接建立请求。
本实施例中,S401的具体实现过程可以参见本发明方法实施例三中S301的具体实现过程,此处不再赘述。
S402、该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。
本实施例中,该代理设备接收到该UE发送的TCP连接建立请求后,确定该UE请求建立TCP连接的服务器是否为要求采用单向认证的TLS接入的服务器,该单向认证的TLS为仅对该服务器进行认证的TLS。当代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,执行S403。
在一种可行的实现方式中,该代理设备中存储有第一预设IP地址白名单,该第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址,该代理设备可以从该TCP连接建立请求对应的IP包头中获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第一预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第一预设IP地址白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第一预设IP地址白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
S403、该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道。
本实施例中,S403的具体实现过程可以参见本发明方法实施例三中 S305的具体实现过程,此处不再赘述。
S404、该代理设备向该UE发送TCP连接建立响应。
本实施例中,S404的具体实现过程可以参见本发明方法实施例三中S302的具体实现过程,此处不再赘述。需要说明的是,S404在S405之前执行即可,本发明实施例对此不做限定。
S405、该UE发送第一HTTP请求。
本实施例中,该UE可以通过上述建立的TCP连接发送第一HTTP请求至该代理设备。
本实施例中,S405的具体实现过程可以参见本发明方法实施例三中S303的具体实现过程,此处不再赘述。
S406、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S407、该服务器通过该TLS通道发送数据。
S408、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S406-S408的具体实现过程可以参见本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备接收到UE发送的TCP连接建立请求后,该代理设备与要求建立TLS通道的服务器之间建立TCP连接和建立TLS通道,然后该代理设备接收该UE发送的第一HTTP请求,再将该第一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的该第一HTTP请求所请求的数据;通过业务处理设备向该UE发送该第一HTTP请求所请求的数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,代理设备在确定该服务器是否为要求采用单向认证的TLS接入的服务器时,当该代理设备确定该服务器不是要求采用单向认证的TLS接入的服务器时,该代理设备向该服务器转发该UE发送的上述TCP连接建立请求,以使该UE与该服务器之间建立TCP连接,则该代理设备不执行上述的S304-S308或者上述的S402-S408;然后该UE与该服务器按照现有技术的流程进行操作,代理设备执行转发动作。
其中,该代理设备确定该服务器不是要求采用单向认证的TLS接入的服务器的可行的实现方式可以为:该代理设备确定该服务器是否为要求采用双向认证的TLS接入的服务器,该双向认证的TLS为该UE与该服务器互相进行认证的TLS;当该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器时,然后该代理设备将该UE发送的TCP连接建立请求发送给服务器,再按照现有技术的流程进行操作(如UE与服务器建立基于443端口的TCP连接和建立TLS通道,该UE再通过TLS通道向服务器发送第一HTTP请求,等),代理设备可以执行转发操作;当该代理设备确定该服务器不是要求采用双向认证的TLS接入的服务器时,该代理设备可以再确定该服务器是否为要求采用单向认证的TLS接入的服务器,当该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,该代理设备执行如上所述的S304-S308或者S402-S408,当该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器时,该代理设备向该服务器转发该UE发送的该TCP连接建立请求,再按照现有技术的流程进行操作(如UE与服务器建立基于80端口的TCP连接,该UE再通过80端口向服务器发送第一HTTP请求),代理设备可以执行转发操作。
在第一种可行的实现方式中,该代理设备可以根据该服务器的URI和第二预设URI白名单来确定该服务器是否为要求采用双向认证的TLS接入的服务器,具体地,该代理设备中存储有第二预设URI白名单,该第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI,该代理设备从第一HTTP请求中获取该UE请求的URI,再根据该UE请求的URI获取该服务器的URI,然后确定该服务器的URI是否属于第二预设URI白名单,当该代理设备确定该服务器的URI属于该第二预设URI白名单,则该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器。当该代理设备确定该服务器的URI不属于该第二预设URI白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
在第二种可行的实现方式中,该代理设备可以根据该服务器的IP地址和第二预设IP地址白名单来确定该服务器是否为要求采用双向认证的TLS接入的服务器,具体地,该代理设备中存储有第二预设IP地址白名 单,该第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址,该代理设备可以从第一HTTP请求中获取该UE请求的URI,然后根据该UE请求的URI获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第二预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第二预设IP地址白名单,则该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第二预设IP地址白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
在第三种可行的实现方式中,该代理设备可以根据该服务器的IP地址和第二预设IP地址白名单来确定该服务器是否为要求采用双向认证的TLS接入的服务器,具体地,该代理设备中存储有第二预设IP地址白名单,该第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址,该代理设备可以从该TCP连接建立请求对应的IP包头中获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第二预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第二预设IP地址白名单,则该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第二预设IP地址白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
图9为本发明数据传输方法实施例五的流程图,如图9所示,本实施例的方法可以包括:
S501、UE发送TCP连接建立请求。
S502、该代理设备向该UE发送TCP连接建立响应。
S503、该UE向该代理设备发送第一HTTP请求。
本实施例中,S501-S503的具体实现过程可以参见本发明方法实施例三S301-S303中的相关记载,此处不再赘述。
S504、该代理设备通过TCP80端口向服务器发送该第一HTTP请求。
本实施例中,该代理设备接收到该UE发送的该第一HTTP请求之后,该代理设备尝试连接到该服务器,即该代理设备通过TCP80端口向该服务器发送该第一HTTP请求。
S505、该服务器向该代理设备发送第一重定向消息。
S506、该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道。
本实施例中,该服务器接收该代理设备通过TCP80端口发送的该第一HTTP请求后,当该服务器为要求采用双向认证的TLS接入的服务器或者要求采用单向认证的TLS接入的服务器时,该服务器向该代理设备发送第一重定向消息,该第一重定向消息包括该UE请求的URI,该第一重定向消息用于指示该UE与该服务器建立TLS通道,其中,当该第一重定向消息包括的URI包括https://时,该第一重向定消息用于指示该UE与所述服务器建立TLS通道;相应地,该代理设备接收到该第一重定向消息之后,根据该第一重定向消息,与该服务器建立基于TCP443端口的TCP连接和建立只对服务器进行单向认证的TLS通道。
当该代理设备与该服务器建立TLS通道成功时,该代理设备可以确定该服务器为要求采用单向认证的TLS接入的服务器,该代理设备执行S507-S509。
当该代理设备与该服务器建立TLS通道失败时,该代理设备可以确定该失败的原因是由于服务器为要求采用双向认证的TLS接入的服务器,即确定该服务器为要求采用双向认证的TLS接入的服务器,然后该代理设备向该UE转发该第一重定向消息,然后该UE根据该第一重定向消息执行现有技术的流程(如UE与服务器建立基于443端口的TCP连接,再建立双向认证的TLS通道,然后该UE再向服务器发送第一HTTP请求,该第一HTTP请求中包括该UE请求的URI),代理设备可以执行转发操作。
S507、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S508、该服务器通过该TLS通道向该代理设备发送数据。
S509、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S507-S509的具体实现过程可以参见本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备接收UE发送的第一HTTP请求,然后代理设备与要求建立TLS通道的该服务器之间建立基于TCP443端口号的TCP连接和建立TLS通道,再将该第 一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,在执行S504后,若该服务器未发送第一重定向消息,代理设备未接收到该服务器发送的第一重定向消息,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,即该代理设备通过TCP80端口向服务器发送所述第一HTTP请求之后,该服务器可以向该代理设备发送该第一HTTP请求所请求的数据,而不向该代理设备发送第一重定向消息,该服务器向该代理设备发送该数据的同时还可以向该代理设备发送200OK的指示信息,该200OK的指示信息用于指示已获取到该UE请求的URI对应的数据,该代理设备接收到该数据后可以确定该服务器既不是要求采用单向认证的TLS接入的服务器也不是要求采用双向认证的TLS接入的服务器,然后该UE与该服务器再按照现有技术的流程进行操作(如UE与服务器建立基于80端口的TCP连接,该UE再通过80端口向服务器发送HTTP请求),代理设备可以执行转发操作。
图10为本发明数据传输方法实施例六的流程图,如图10所示,本实施例的方法可以包括:
S601、UE向代理设备发送TCP连接建立请求。
S602、该代理设备向该UE发送TCP连接建立响应。
本实施例中,该UE可以根据该UE的用户代理配置的代理设备的地址格式向该代理设备发送TCP连接建立请求。
若配置的该代理设备的地址格式为http://FQDN,或者FQDN,该FQDN为该代理设备的FQDN,则该UE通过TCP8080端口向该代理设备发送TCP连接请求,该TCP连接建立请求对应的IP头中的目的IP地址为该代理设备的IP地址,表示该UE需要与该代理设备建立基于TCP8080端口的TCP连接,该代理设备接收该UE发送的TCP连接建立请求,该 代理设备根据该TCP连接建立请求确定该UE需要与该代理设备建立TCP连接,该代理设备向该UE发送该TCP连接建立响应,UE接收到该代理设备发送的TCP连接建立响应,以建立该代理设备与该UE之间的基于TCP8080端口的TCP连接。
若配置的该代理设备的地址格式为https://FQDN,该FQDN为该代理设备的FQDN,则该UE通过TCP8443端口向该代理设备发送TCP连接请求,该TCP连接建立请求对应的IP头中的目的IP地址为该代理设备的IP地址,表示该UE需要与该代理设备建立基于TCP8443端口的TCP连接,该代理设备接收该UE发送的TCP连接建立请求,该代理设备根据该TCP连接建立请求确定该UE需要与该代理设备建立TCP连接,该代理设备向该UE发送该TCP连接建立响应,UE接收到该代理设备发送的TCP连接建立响应,以建立该代理设备与该UE之间的基于TCP8443端口的TCP连接。可选地,该UE与该代理设备在建立基于TCP8443端口的TCP连接之后,该UE还可以与该代理设备建立TLS通道。
S603、当用户向UE输入的URI指示该UE不需要与服务器建立TLS通道时,该UE向该代理设备发送第一HTTP请求。
本实施例中,该UE与该代理设备建立TCP连接之后,该UE可以根据用户输入的URI(即上述各实施例中的UE请求的URI)确定该UE是否需要与该URI对应的服务器建立TLS通道,当该UE确定该用户输入的URI指示该UE不需要与该服务器建立TLS通道时,该UE向该代理设备发送第一HTTP请求,该第一HTTP请求包括该UE请求的URI。其中,若该UE与该代理设备建立基于TCP8080端口的TCP连接,该UE通过TCP8080端口向代理设备发送第一HTTP请求;若该UE与该代理设备建立基于TCP8443端口的TCP连接,该UE通过TCP8443端口向代理设备发送第一HTTP请求。
S604、该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。
本实施例中,该代理设备接收到该UE发送的第一HTTP请求后,确定该UE请求的URI对应的服务器是否为要求采用单向认证的TLS接入的服务器,该单向认证的TLS为仅对该服务器进行认证的TLS。当代理设备 确定该服务器为要求采用单向认证的TLS接入的服务器时,执行S605-S608。该代理设备可以从该第一HTTP请求中获取该UE请求的URI,并根据该UE请求的URI获取该服务器的URI,然后根据该服务器的URI确定该服务器是否为采用单向认证的TLS接入的服务器,具体实现过程可以参见本发明方法实施例三S304中的可行的实现方式,此处不再赘述;或者,该代理设备可以从该第一HTTP请求中获取该UE请求的URI,然后根据该UE请求的URI获取该服务器的IP地址,或者根据该第一HTTP请求消息对应的IP层的IP数据包头中获取服务器的IP地址,再根据该服务器的IP地址确定该服务器是否为采用单向认证的TLS接入的服务器,具体实现过程可以参见本发明方法实施例三S304中的可行的实现方式,此处不再赘述。
S605、该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道。
本实施例中,该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道,此时服务器将该代理设备作为该UE,以满足服务器要求的端到端传输。
S606、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S607、该服务器通过该TLS通道发送数据。
S608、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S606-S608的具体实现过程可以参见本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备接收UE发送的第一HTTP请求,然后代理设备与要求建立TLS通道的该服务器之间建立TCP连接和建立TLS通道,再将该第一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操 作。
可选地,在执行S603之后,该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器时,该代理设备向该UE发送第二重定向消息,该第二重定向消息包括该UE请求的URI,该第二重定向消息用于指示该UE与该服务器建立TLS通道,该代理设备与该服务器建立基于TCP443端口的TCP连接。具体地,该UE接收到该代理设备发送的第二重定向消息后,向该代理设备发送一个CONNECT命令,该CONNECT命令包括该服务器的FQDN和TCP443端口号,然后该代理设备与该服务器建立基于TCP443端口的TCP连接,该代理设备再向该UE发送200 CONNECT established消息,然后该UE与该服务器建立TLS通道,后续该UE与该服务器按照现有技术的流程进行操作,代理设备执行转发动作。在这种场景下,该代理设备不执行S604-S608。该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器的具体实现过程可以参见上述实施例中记载的实现方案,此处不再赘述。
在执行S603之后,该代理设备确定该服务器不是要求采用单向认证的TLS接入服务器和要求采用双向认证的TLS接入的服务器时,该代理设备与该服务器建立基于TCP80端口的TCP连接,并向该服务器转发该第一HTTP请求,然后该UE与该服务器按照现有技术的流程进行操作,代理设备执行转发动作。在这种场景下,该代理设备不执行S604-S608。该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器的具体实现过程可以参见上述实施例中记载的实现方案,此处不再赘述。
图11为本发明数据传输方法实施例七的流程图,如图11所示,本实施例的方法可以包括:
S701、UE向代理设备发送TCP连接建立请求。
S702、该代理设备向该UE发送TCP连接建立响应。
S703、当用户向UE输入的URI指示该UE不需要与服务器建立TLS通道时,该UE向该代理设备发送第一HTTP请求。
本实施例中,S701-S703的具体实现过程可以参见本发明方法实施例六S601-S603中的相关记载,此处不再赘述。
S704、该代理设备通过TCP80端口向服务器发送该第一HTTP请求。
本实施例中,该代理设备接收到该UE发送的该第一HTTP请求之后,该代理设备尝试连接到该服务器,即该代理设备通过TCP80端口向该服务器发送该第一HTTP请求。
S705、该服务器向该代理设备发送第一重定向消息。
S706、该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道。
本实施例中,该服务器接收该代理设备通过TCP80端口发送的该第一HTTP请求后,当该服务器为要求采用双向认证的TLS接入的服务器或者要求采用单向认证的TLS接入的服务器时,该服务器向该代理设备发送第一重定向消息,该第一重定向消息包括该UE请求的URI,该第一重定向消息用于指示该UE与该服务器建立TLS通道,其中,当该第一重定向消息包括的URI包括https://时,该第一重向定消息用于指示该UE与所述服务器建立TLS通道;相应地,该代理设备接收到该第一重定向消息之后,根据该第一重定向消息,与该服务器建立基于TCP443端口的TCP连接和只对服务器进行单向认证的TLS通道。
当该代理设备与该服务器建立TLS通道成功时,该代理设备可以确定该服务器为要求采用单向认证的TLS接入的服务器,该代理设备执行S707-S709。
当该代理设备与该服务器建立TLS通道失败时,该代理设备可以确定该失败的原因是由于服务器为要求采用双向认证的TLS接入的服务器,即确定该服务器为要求采用双向认证的TLS接入的服务器,然后该代理设备向该UE转发该第一重定向消息。具体地,该UE接收到该代理设备发送的第一重定向消息后,向该代理设备发送一个CONNECT命令,该CONNECT命令包括该服务器的FQDN和TCP443端口号,该代理设备向该UE发送200 CONNECT established消息,然后该UE与该服务器建立TLS通道,后续该UE与该服务器按照现有技术的流程进行操作,代理设备执行转发动作。在这种场景下,该代理设备不执行S707-S709。
S707、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S708、该服务器通过该TLS通道向该代理设备发送数据。
S709、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S707-S709的具体实现过程与本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备接收UE发送的第一HTTP请求,然后代理设备与要求建立TLS通道的该服务器之间建立TCP连接和建立TLS通道,再将该第一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,在执行S704后,若该服务器未发送第一重定向消息,代理设备未接收到该服务器发送的第一重定向消息,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,即该代理设备通过TCP80端口向服务器发送所述第一HTTP请求之后,该服务器可以向该代理设备发送该第一HTTP请求所请求的数据,而不向该代理设备发送第一重定向消息,该服务器向该代理设备发送该数据的同时还可以向该代理设备发送200OK的指示信息,该200OK的指示信息用于指示已获取到该UE请求的URI对应的数据,该代理设备接收到该数据后可以确定该服务器既不是要求采用单向认证的TLS接入的服务器也不是要求采用双向认证的TLS接入的服务器,该服务器与该代理设备建立基于TCP80端口的TCP连接,然后该UE与该服务器再按照现有技术的流程进行操作,代理设备可以执行转发操作。在这种场景下,不执行S705-S709。
图12为本发明数据传输方法实施例八的流程图,如图12所示,本实施例的方法可以包括:
S801、UE向代理设备发送TCP连接建立请求。
S802、该代理设备向该UE发送TCP连接建立响应。
本实施例中,S801和S802的具体实现过程可以参见本发明方法实施例S601和S602中的相关记载,此处不再赘述。
S803、当用户向UE输入的URI指示该UE需要与服务器建立TLS通道时,该UE向该代理设备发送透明连接请求。
本实施例中,该UE与该代理设备建立TCP连接之后,该UE可以根据用户输入的URI(即上述各实施例中的UE请求的URI)确定该UE是否需要与该URI对应的服务器建立TLS通道,当该UE确定该用户输入的URI指示该UE需要与服务器建立TLS通道时,该UE向该代理设备发送透明连接请求,该透明连接请求可以为CONNECT命令,该透明连接请求包括该服务器的FQDN和TCP443端口号,该透明连接请求用于指示该UE需要请求通过TCP443端口连接到该FQDN对应的该服务器。
S804、该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。
S805、所述代理设备向所述UE发送第三重定向消息。
本实施例中,该代理设备接收到该UE发送透明连接请求后,该代理设备还可以根据该服务器的FQDN确定该服务器是否为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器时,该代理设备向该UE发送该第三重向定消息,该第三重定向消息包括所述服务器的FQDN和TCP80端口号,该第三重定向消息用于指示该UE通过TCP80端口连接到该FQDN对应的该服务器以获取该UE请求的URI所对应的数据。
可选地,该代理设备根据该服务器的FQDN确定该服务器是否为要求采用单向认证的TLS接入的服务器的具体实现方式如下所述。
在第一种可行的实现方式中,该代理设备中存储有第一预设FQDN白名单,该第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN,该代理设备从透明连接请求中获取该服务器的FQDN,然后确定该服务器的FQDN是否属于第一预设FQDN白名单,当该代理设备确定该服务器的FQDN属于该第一预设FQDN白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的FQDN不属于该第一预设FQDN白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
在第二种可行的实现方式中,该代理设备中存储有第一预设URI白名 单,该第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI,该代理设备从透明连接请求中获取该服务器的FQDN,然后根据该FQDN获取该服务器的URI,然后确定该服务器的URI是否属于第一预设URI白名单,当该代理设备确定该服务器的URI属于该第一预设URI白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的URI不属于该第一预设URI白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
在第三种可行的实现方式中,该代理设备中存储有第一预设IP地址白名单,该第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址,该代理设备可以从透明连接请求中获取该服务器的FQDN,然后根据该服务器的FQDN获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第一预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第一预设IP地址白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第一预设IP地址白名单,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器。
S806、该UE向该代理设备发送第一HTTP请求。
本实施例中,该UE可以通过建立的TCP连接向该代理设备发送HTTP请求,该第一HTTP请求包括该UE请求的URI。
S807、该代理设备与该服务器建立基于TCP443端口的TCP连接和建立TLS通道。
本实施例中,S807的具体实现过程可以参见本发明方法实施例六中S605的相关记载,此处不再赘述。
可选地,该S807可以在S804之后执行,即该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器之后,代理设备执行S807,其中,S807与S805和S806的执行顺序不分先后。
S808、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S809、该服务器通过该TLS通道向该代理设备发送数据。
S810、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S808-S810的具体实现过程可以参见本发明方法实施例 一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备与要求建立TLS通道的该服务器之间建立TCP连接和建立TLS通道,并接收UE发送的第一HTTP请求,再将该第一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务处理设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,在执行S803之后,当该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器时,该双向认证的TLS为该UE与该服务器互相进行认证的TLS。该代理设备与该服务器建立基于TCP443端口的TCP连接,以及该代理设备向该UE发送第一确定消息,该第一确定消息用于指示该UE通过TCP443端口连接到该FQDN对应的该服务器,该第一确定消息可以200 CONNECT established消息,然后该UE根据第一确定消息执行现有技术的流程(如UE与服务器建立TLS安全通道,该UE再通过TLS安全通道向服务器发送HTTP请求,该HTTP请求包括用户请求的URI,等),代理设备可以执行转发操作。在这种场景下,不执行S804-S810。
可选地,在执行S803之后,当该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器和要求采用单向认证的TLS接入服务器时,该代理设备与该服务器建立基于TCP80端口的TCP连接,该代理设备向该UE发送第四重定向消息,该第四重定向消息包括该服务器的FQDN和TCP80端口号,该第四重定向消息用于指示该UE通过TCP80端口连接到该FQDN对应的该服务器以获取该UE请求的URI对应的数据,然后该UE根据第四重定向消息执行现有技术的流程(如该UE向服务器发送HTTP请求,该HTTP请求包括UE请求的URI,等),代理设备可以执行转发操作。在这种场景下,不执行S804-S810。
可选地,该代理设备根据该服务器的FQDN确定该服务器是否为要求采用双向认证的TLS接入的服务器的具体实现方式如下所述。
在第一种可行的实现方式中,该代理设备中存储有第二预设FQDN白名单,该第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN,该代理设备从透明连接请求中获取该服务器的FQDN,然后确定该服务器的FQDN是否属于第二预设FQDN白名单,当该代理设备确定该服务器的FQDN属于该第二预设FQDN白名单,则该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器。当该代理设备确定该服务器的FQDN不属于该第二预设FQDN白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
在第二种可行的实现方式中,该代理设备中存储有第二预设URI白名单,该第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI,该代理设备从透明连接请求中获取该服务器的FQDN,然后根据该FQDN获取该服务器的URI,然后确定该服务器的URI是否属于第二预设URI白名单,当该代理设备确定该服务器的URI属于该第二预设URI白名单,则该代理设备确定该服务器为要求采用双向认证的TLS接入的服务器。当该代理设备确定该服务器的URI不属于该第二预设URI白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
在第三种可行的实现方式中,该代理设备中存储有第二预设IP地址白名单,该第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址,该代理设备可以从透明连接请求中获取该服务器的FQDN,然后根据该服务器的FQDN获取该服务器的IP地址,然后确定该服务器的IP地址是否属于第二预设IP地址白名单,当该代理设备确定该服务器的IP地址属于该第二预设IP地址白名单,则该代理设备确定该服务器为要求采用单向认证的TLS接入的服务器。当该代理设备确定该服务器的IP地址不属于该第二预设IP地址白名单,则该代理设备确定该服务器不为要求采用双向认证的TLS接入的服务器。
图13为本发明数据传输方法实施例九的流程图,如图13所示,本实施例的方法可以包括:
S901、UE向代理设备发送TCP连接建立请求。
S902、该代理设备向该UE发送TCP连接建立响应。
S903、当用户向UE输入的URI指示该UE需要与服务器建立TLS通 道时,该UE向该代理设备发送透明连接请求。
本实施例中,S901-S903的具体实现过程可以参见本发明方法实施例八中S801-S803的相关记载,此处不再赘述。
S904、该代理设备根据该服务器的FQDN生成该服务器的URI。
S905、该代理设备根据该服务器的URI生成第二HTTP请求。
S906、该代理设备通过TCP80端口向该服务器发送该第二HTTP请求;
本实施例中,该代理设备尝试连接到服务器,具体地,该代理设备从该透明连接请求中获取该服务器的FQDN,并根据该FQDN生成该服务器的URI,再根据该服务器的URI生成第二HTTP请求。然后该代理设备通过TCP80端口向该服务器发送该第二HTTP请求。
S907、该服务器向该代理设备发送第五重定向消息。
S908、该代理设备与该服务器建立基于TCP443端口的TCP连接和TLS通道。
本实施例中,该服务器接收该代理设备通过TCP80端口发送的该第二HTTP请求后,当该服务器为要求采用双向认证的TLS接入的服务器或者要求采用单向认证的TLS接入的服务器时,该服务器向该代理设备发送第五重定向消息,该第五重定向消息包括该服务器的URI,该第五重定向消息用于指示该UE与该服务器建立TLS通道;相应地,该代理设备接收到该第五重定向消息之后,根据该第五重定向消息,与该服务器建立基于TCP443端口号的TCP连接和建立TLS通道。
当该代理设备与该服务器建立TLS通道成功时,该代理设备可以确定该服务器为要求采用单向认证的TLS接入的服务器,执行S909-S913。
可选地,当该代理设备与该服务器建立TLS通道失败时,该代理设备可以确定该服务器为要求采用双向认证的TLS接入的服务器,然后该代理设备向该UE发送第二确定消息,该第二确定消息可以为200 CONNECT established消息,该第二确定消息用于指示该UE通过TCP443端口连接到该FQDN对应的所述服务器,然后该UE根据该第二确定消息与该服务器建立TLS通道,后续该UE与该服务器按照现有技术的流程进行操作,代理设备可以执行转发操作。在这种场景下,该代理设备不执行 S909-S913。
S909、该代理设备向该UE发送第三重定向消息。
本实施例中,该代理设备与该服务器成功建立TLS通道后,该代理设备向该UE发送第三重定向消息。
本实施例中,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到该FQDN对应的服务器以获取该UE请求的URI对应的数据。
S910、该UE向该代理设备发送第一HTTP请求。
本实施例中,S910的具体实现过程可以参见本发明方法实施例八中S806中的相关记载,此处不再赘述。
S911、该代理设备通过该TLS向该服务器发送该第一HTTP请求。
S912、该服务器通过该TLS通道向该代理设备发送数据。
S913、该代理设备通过业务处理设备向该UE发送该数据。
本实施例中,S911-S913的具体实现过程可以参见本发明方法实施例一中的相关记载,此处不再赘述。
本实施例中,在代理设备与UE建立TCP连接之后,代理设备与要求建立TLS通道的该服务器之间建立TCP连接和建立TLS通道,并接收UE发送的第一HTTP请求,再将该第一HTTP请求通过该TLS通道转发给服务器;接收该服务器通过该TLS通道发送的数据;通过业务网络设备向该UE发送该数据。由于该代理设备与该服务器之间建立了TLS通道,因此该UE可以通过第一HTTP请求获取该服务器中的数据,既满足了服务器要求的端至端安全传输,也使得服务器发送的该UE请求的数据可以被网络设备所获取,进而可以进行业务处理操作,如VAS操作。
可选地,在执行S906后,若该服务器未发送第五重定向消息,代理设备未接收到该服务器发送的第五重定向消息,则该代理设备确定该服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,即该代理设备通过TCP80端口向服务器发送所述第一HTTP请求之后,该服务器可以向该代理设备发送第三确定消息,而不向该代理设备发送第五重定向消息,该第三确定消息可以为200OK消息,该代理设备接收到该第三确定消息后可以确定该代理设备与该服务器不 需要建立TLS通道,也就是该服务器既不是要求采用单向认证的TLS接入的服务器也不是要求采用双向认证的TLS接入的服务器;然后该代理设备向该UE发送第六重定向消息,该第六重定向消息用于指示该UE通过TCP80端口连接到该FQDN对应的该服务器以获取该UE请求的URI对应的数据,然后该UE与该服务器再按照现有技术的流程进行操作,代理设备可以执行转发操作。在这种场景下,不执行S907-S913。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:只读内存(英文:Read-Only Memory,简称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (58)

  1. 一种代理设备,其特征在于,包括:
    接收单元,用于接收用户设备UE发送的第一超文本传输协议HTTP请求,所述第一HTTP请求包括所述UE请求的统一资源标识符URI;
    发送单元,用于当所述UE请求的URI对应的服务器为要求采用单向认证的安全传输层协议TLS接入的服务器时,通过所述代理设备与所述服务器之间的TLS通道向所述服务器发送所述第一HTTP请求;所述单向认证的TLS为仅对所述服务器进行认证的TLS;
    所述接收单元,还用于接收数据,所述数据是所述服务器在接收到所述第一HTTP请求后通过所述TLS通道发送的;
    所述发送单元,还用于通过业务处理设备向所述UE发送所述数据。
  2. 根据权利要求1所述的代理设备,其特征在于,还包括:
    处理单元,用于与所述服务器建立基于传输控制协议TCP443端口的TCP连接;以及与所述服务器建立所述TLS通道。
  3. 根据权利要求2所述的代理设备,其特征在于,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的互联网协议IP头中的目的IP地址为所述服务器的IP地址;
    所述发送单元,还用于向所述UE发送TCP连接建立响应,以与所述UE建立TCP连接。
  4. 根据权利要求3所述的代理设备,其特征在于,所述处理单元还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
  5. 根据权利要求4所述的代理设备,其特征在于,所述处理单元在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI,当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    根据所述UE请求的URI获取所述服务器的IP地址,或者,从所述TCP 连接建立请求对应的IP包头中获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  6. 根据权利要求4或5所述的代理设备,其特征在于,所述发送单元还用于,当所述处理单元确定所述服务器不是要求采用单向认证的TLS接入的服务器时,向所述服务器转发所述UE发送的所述TCP连接建立请求;
    所述发送单元还用于在所述接收单元接收所述UE发送的所述第一HTTP请求之后,向所述服务器转发所述第一HTTP请求。
  7. 根据权利要求2所述的代理设备,其特征在于,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
    所述发送单元,还用于向所述UE发送TCP连接建立响应消息,以与所述UE建立TCP连接。
  8. 根据权利要求3或7所述的代理设备,其特征在于,所述发送单元还用于在所述处理单元与所述服务器建立TLS通道之前,通过TCP80端口向所述服务器发送所述第一HTTP请求;
    所述接收单元还用于,接收所述服务器发送的第一重定向消息,所述第一重定向消息包括所述UE请求的URI,所述第一重定向消息用于指示所述UE与所述服务器建立TLS通道;
    所述处理单元在与所述服务器建立TLS通道时,具体用于:根据所述第一重定向消息,与所述服务器建立所述TLS通道;
    所述处理单元还用于在所述发送单元通过所述代理设备与所述服务器之间的TLS通道向服务器发送所述第一HTTP请求之前,当与所述服务器成功建立TLS通道时,确定所述服务器为要求采用单向认证的TLS接入的服务器。
  9. 根据权利要求8所述的代理设备,其特征在于,所述处理单元还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;
    所述发送单元还用于,向所述UE转发所述服务器发送的所述第一重定 向消息;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  10. 根据权利要求8所述的代理设备,其特征在于,所述处理单元还用于在所述发送单元通过TCP80端口向所述服务器发送所述第一HTTP请求之后,若所述接收单元未接收到所述服务器发送的第一重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;
    所述接收单元还用于,接收所述服务器发送的所述第一HTTP请求所请求的数据;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
    所述发送单元,还用于通过所述业务处理设备向所述UE发送所述第一HTTP请求所请求的数据。
  11. 根据权利要求7所述的代理设备,其特征在于,所述处理单元还用于在与所述服务器建立TLS通道之前,确定所述服务器为要求采用单向认证的TLS接入的服务器。
  12. 根据权利要求11所述的代理设备,其特征在于,所述处理单元在确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  13. 根据权利要求11或12所述的代理设备,其特征在于,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
    所述发送单元还用于,当所述处理单元确定所述服务器为要求采用双向认证的TLS接入的服务器时,向所述UE发送第二重定向消息;所述处理单元还用于与所述服务器建立基于TCP443端口的TCP连接;所述第二重定向消息包括所述UE请求的URI,所述第二重定向消息用于指示所述UE与所述 服务器建立TLS通道;
    所述处理单元还用于,当确定所述服务器不是要求采用双向认证的TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;所述发送单元还用于向所述服务器转发所述第一HTTP请求;
    其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  14. 根据权利要求13所述的代理设备,其特征在于,所述处理单元在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:根据所述UE请求的URI获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
    所述根据所述UE请求的URI获取所述服务器的IP地址;当确定所述服务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器;所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
  15. 根据权利要求7所述的代理设备,其特征在于,所述接收单元还用于在接收UE发送的第一HTTP请求之前,接收所述UE发送的透明连接请求,所述透明连接请求包括所述服务器的正式域名FQDN和TCP443端口号,所述透明连接请求用于指示所述UE需要请求通过TCP443端口连接到所述FQDN对应的所述服务器;
    所述发送单元,还用于根据所述透明连接请求向所述UE发送第三重定向消息,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
  16. 根据权利要求15所述的代理设备,其特征在于,所述处理单元还用于在所述发送单元根据所述透明连接请求向所述UE发送第三重定向消息之前,根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器。
  17. 根据权利要求16所述的代理设备,其特征在于,所述处理单元在根 据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器时,具体用于:当确定所述服务器的FQDN属于第一预设FQDN白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN;或者,
    根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第一预设URI白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服务器的IP地址属于第一预设IP地址白名单时,确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  18. 根据权利要求16或17所述的代理设备,其特征在于,当所述服务器不为要求采用单向认证的TLS接入的服务器时;
    所述处理单元还用于,当确定所述服务器为要求采用双向认证的TLS接入的服务器时,与所述服务器建立基于TCP443端口的TCP连接;所述发送单元还用于向所述UE发送第一确定消息,所述第一确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据;
    所述处理单元还用于,当确定所述服务器不为要求采用双向认证的TLS接入的服务器时,与服务器建立基于TCP80端口的TCP连接;所述发送单元还用于向所述UE发送第四重定向消息,所述第四重定向消息包括所述服务器的FQDN和TCP80端口号,所述第四重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的服务器以获取所述UE请求的URI所对应的数据;
    其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  19. 根据权利要求18所述的代理设备,其特征在于,所述处理单元在确定所述服务器为要求采用双向认证的TLS接入的服务器时,具体用于:当确 定所述服务器的FQDN属于第二预设FQDN白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN;或者,
    根据所述服务器的FQDN获取所述服务器的URI;当确定所述服务器的URI属于第二预设URI白名单时,确定所述服务器确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
    根据所述服务器的FQDN获取所述服务器的IP地址;当确定所述服务器的IP地址属于第二预设IP地址白名单时,确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
  20. 根据权利要求15所述的代理设备,其特征在于,所述处理单元还用于在与所述服务器建立TLS通道之前,根据所述服务器的FQDN生成所述服务器的URI;以及根据所述服务器的URI生成第二HTTP请求,所述第二HTTP请求包括所述服务器的URI;
    所述发送单元,还用于通过TCP80端口向所述服务器发送所述第二HTTP请求;
    所述接收单元,还用于接收所述服务器发送的第五重定向消息,所述第五重定向消息包括所述服务器的URI,所述第五重定向消息用于指示所述UE与所述服务器建立TLS通道;
    所述处理单元在与所述服务器建立TLS通道时,具体用于:根据所述第五重定向消息,与所述服务器建立所述TLS通道;
    所述处理单元还用于在所述发送单元根据所述透明连接请求向所述UE发送第三重定向消息之前,当与所述服务器建立TLS通道成功时,确定所述服务器为要求采用单向认证的TLS接入的服务器。
  21. 根据权利要求20所述的代理设备,其特征在于,所述处理单元还用于,当与所述服务器建立TLS通道失败时,确定所述服务器为要求采用双向认证的TLS接入的服务器;
    所述发送单元还用于向所述UE发送第二确定消息,所述第二确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器; 其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  22. 根据权利要求20所述的代理设备,其特征在于,所述处理单元还用于在所述发送单元向所述服务器发送所述第二HTTP请求之后,若所述接收单元未接收到所述服务器发送的第五重定向消息,则确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器;
    所述接收单元还用于接收所述服务器发送的第三确定消息;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
    所述发送单元还用于向所述UE发送第六重定向消息,所述第六重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
  23. 根据权利要求7-22任意一项所述的代理设备,其特征在于,当所述代理设备与所述UE建立基于TCP8443端口的TCP连接时;
    所述处理单元还用于在所述代理设备与UE建立基于TCP8443端口的TCP连接之后,与所述UE建立TLS通道。
  24. 一种用户设备UE,其特征在于,包括:
    发送单元,用于发送超文本传输协议HTTP请求,所述HTTP请求包括所述UE请求的统一资源标识符URI;
    接收单元,用于通过业务处理设备接收代理设备发送的数据,所述数据为所述代理设备接收所述URI对应的服务器在接收到所述HTTP请求后通过所述代理设备与所述服务器之间的安全传输层协议TLS通道发送的。
  25. 根据权利要求24所述的UE,其特征在于,所述发送单元还用于在发送HTTP请求之前,发送传输控制协议TCP连接建立请求,所述TCP连接建立请求对应的互联网协议IP头中的目的IP地址为所述服务器的IP地址;
    所述接收单元还用于接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
  26. 根据权利要求24所述的UE,其特征在于,所述发送单元还用于在发送HTTP请求之前,向所述代理设备发送TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
    所述接收单元还用于接收所述代理设备发送的TCP连接建立响应,以与 所述代理设备建立TCP连接。
  27. 根据权利要求26所述的UE,其特征在于,所述发送单元在发送HTTP请求时,具体用于:当所述URI指示所述UE不需要与所述服务器建立TLS通道时,向所述代理设备发送HTTP请求。
  28. 根据权利要求26所述的UE,其特征在于,所述发送单元还用于,在所述UE与所述代理设备建立TCP连接之后,当所述URI指示所述UE需要与所述服务器建立TLS通道时,向所述代理设备发送透明连接请求,所述透明连接请求包括所述服务器的正式域名FDQN和TCP443端口号,所述透明连接请求用于指示所述UE请求连接到所述FQDN对应的所述服务器;
    所述接收单元还用于接收所述代理设备发送的重定向消息,所述重定向消息包括所述服务器的FQDN和TCP80端口号,所述重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN所对应的服务器以获取所述UE请求的URI对应的数据;
    所述发送单元在发送HTTP请求时,具体用于:根据所述重定向消息发送所述HTTP请求。
  29. 根据权利要求26-28任意一项所述的UE,其特征在于,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述UE还包括:
    处理单元,用于在所述UE与所述代理设备建立基于TCP8443端口的TCP连接之后,与所述代理设备建立TLS通道。
  30. 一种数据传输方法,其特征在于,包括:
    代理设备接收用户设备UE发送的第一超文本传输协议HTTP请求,所述第一HTTP请求包括所述UE请求的统一资源标识符URI;
    当所述UE请求的URI对应的服务器为要求采用单向认证的安全传输层协议TLS接入的服务器时,所述代理设备通过所述代理设备与所述服务器之间的TLS通道向所述服务器发送所述第一HTTP请求;所述单向认证的TLS为仅对所述服务器进行认证的TLS;
    所述代理设备接收数据,所述数据是所述服务器在接收到所述第一HTTP请求后通过所述TLS通道发送的;
    所述代理设备通过业务处理设备向所述UE发送所述数据。
  31. 根据权利要求30所述的方法,其特征在于,还包括:
    所述代理设备与所述服务器建立基于传输控制协议TCP443端口的TCP连接;
    所述代理设备与所述服务器建立所述TLS通道。
  32. 根据权利要求31所述的方法,其特征在于,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
    所述代理设备接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的互联网协议IP头中的目的IP地址为所述服务器的IP地址;
    所述代理设备向所述UE发送TCP连接建立响应,以与所述UE建立TCP连接。
  33. 根据权利要求32所述的方法,其特征在于,所述代理设备与所述服务器建立TLS通道之前,还包括:
    所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
  34. 根据权利要求33所述的方法,其特征在于,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
    所述代理设备根据所述UE请求的URI获取所述服务器的URI,当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    所述代理设备根据所述UE请求的URI获取所述服务器的IP地址,或者,所述代理设备从所述TCP连接建立请求对应的IP包头中获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  35. 根据权利要求33或34所述的方法,其特征在于,还包括:当所述代理设备确定所述服务器不是要求采用单向认证的TLS接入的服务器时,所述代理设备向所述服务器转发所述UE发送的所述TCP连接建立请求;
    所述代理设备接收所述UE发送的所述第一HTTP请求之后,还包括:所述代理设备向所述服务器转发所述第一HTTP请求。
  36. 根据权利要求31所述的方法,其特征在于,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
    所述代理设备接收所述UE发送的TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
    所述代理设备向所述UE发送TCP连接建立响应消息,以与所述UE建立TCP连接。
  37. 根据权利要求32或36所述的方法,其特征在于,所述代理设备与所述服务器建立TLS通道之前,还包括:所述代理设备通过TCP80端口向所述服务器发送所述第一HTTP请求;所述代理设备接收所述服务器发送的第一重定向消息,所述第一重定向消息包括所述UE请求的URI,所述第一重定向消息用于指示所述UE与所述服务器建立TLS通道;
    所述代理设备与所述服务器建立TLS通道,包括:所述代理设备根据所述第一重定向消息,与所述服务器建立所述TLS通道;
    所述代理设备通过所述代理设备与所述服务器之间的TLS通道向服务器发送所述第一HTTP请求之前,还包括:
    当所述代理设备与所述服务器成功建立TLS通道时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
  38. 根据权利要求37所述的方法,其特征在于,还包括:当所述代理设备与所述服务器建立TLS通道失败时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,以及所述代理设备向所述UE转发所述服务器发送的所述第一重定向消息;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  39. 根据权利要求37所述的方法,其特征在于,所述代理设备通过TCP80端口向所述服务器发送所述第一HTTP请求之后,还包括:若所述代理设备未接收到所述服务器发送的第一重定向消息,则所述代理设备确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,以及所述代理设备接收所述服务器发送的所述第一HTTP请求所请求的数据;所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
    所述代理设备通过所述业务处理设备向所述UE发送所述第一HTTP请 求所请求的数据。
  40. 根据权利要求36所述的方法,其特征在于,所述代理设备与所述服务器建立TLS通道之前,还包括:
    所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
  41. 根据权利要求40所述的方法,其特征在于,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
    所述代理设备根据所述UE请求的URI获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    所述代理设备根据所述UE请求的URI获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  42. 根据权利要求40或41所述的方法,其特征在于,当所述服务器不为要求采用单向认证的TLS接入的服务器时,还包括:
    当所述代理设备确定所述服务器是要求采用双向认证的TLS接入的服务器时,所述代理设备向所述UE发送第二重定向消息,以及所述代理设备与所述服务器建立基于TCP443端口的TCP连接;所述第二重定向消息包括所述UE请求的URI,所述第二重定向消息用于指示所述UE与所述服务器建立TLS通道;
    当所述代理设备确定所述服务器不是要求采用双向认证的TLS接入的服务器时,所述代理设备与服务器建立基于TCP80端口的TCP连接,以及向所述服务器转发所述第一HTTP请求;
    其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  43. 根据权利要求42所述的方法,其特征在于,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,包括:
    所述代理设备根据所述UE请求的URI获取所述服务器的URI;当所述 代理设备确定所述服务器的URI属于第二预设URI白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器;其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
    所述代理设备根据所述UE请求的URI获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第二预设IP地址白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器;所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
  44. 根据权利要求36所述的方法,其特征在于,所述代理设备接收UE发送的第一HTTP请求之前,还包括:
    所述代理设备接收所述UE发送的透明连接请求,所述透明连接请求包括所述服务器的正式域名FQDN和TCP443端口号,所述透明连接请求用于指示所述UE需要请求通过TCP443端口连接到所述FQDN对应的所述服务器;
    所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息,所述第三重定向消息包括所述服务器的FQDN和TCP80端口号,所述第三重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
  45. 根据权利要求44所述的方法,其特征在于,所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息之前,还包括:
    所述代理设备根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器。
  46. 根据权利要求45所述的方法,其特征在于,所述代理设备根据所述服务器的FQDN确定所述服务器为要求采用单向认证的TLS接入的服务器,包括:
    当所述代理设备确定所述服务器的FQDN属于第一预设FQDN白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器;其中,所述第一预设FQDN白名单包括要求采用单向认证的TLS接入的服务器的FQDN;或者,
    所述代理设备根据所述服务器的FQDN获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第一预设URI白名单时,所述代理设备 确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设URI白名单包括要求采用单向认证的TLS接入的服务器的URI;或者,
    所述代理设备根据所述服务器的FQDN获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第一预设IP地址白名单时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器,其中,所述第一预设IP地址白名单包括要求采用单向认证的TLS接入的服务器的IP地址。
  47. 根据权利要求45或46所述的方法,其特征在于,当所述服务器不为要求采用单向认证的TLS接入的服务器时,还包括:
    当所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器时,所述代理设备与所述服务器建立基于TCP443端口的TCP连接,以及所述代理设备向所述UE发送第一确定消息,所述第一确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据;
    当所述代理设备确定所述服务器不为要求采用双向认证的TLS接入的服务器时,所述代理设备与服务器建立基于TCP80端口的TCP连接,以及所述代理设备向所述UE发送第四重定向消息,所述第四重定向消息包括所述服务器的FQDN和TCP80端口号,所述第四重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的服务器以获取所述UE请求的URI所对应的数据;
    其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  48. 根据权利要求47所述的方法,其特征在于,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,包括:
    当所述代理设备确定所述服务器的FQDN属于第二预设FQDN白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设FQDN白名单包括要求采用双向认证的TLS接入的服务器的FQDN;或者,
    所述代理设备根据所述服务器的FQDN获取所述服务器的URI;当所述代理设备确定所述服务器的URI属于第二预设URI白名单时,所述代理设备 确定所述服务器确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设URI白名单包括要求采用双向认证的TLS接入的服务器的URI;或者,
    所述代理设备根据所述服务器的FQDN获取所述服务器的IP地址;当所述代理设备确定所述服务器的IP地址属于第二预设IP地址白名单时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,其中,所述第二预设IP地址白名单包括要求采用双向认证的TLS接入的服务器的IP地址。
  49. 根据权利要求44所述的方法,其特征在于,所述代理设备与所述服务器建立TLS通道之前,还包括:
    所述代理设备根据所述服务器的FQDN生成所述服务器的URI;
    所述代理设备根据所述服务器的URI生成第二HTTP请求,所述第二HTTP请求包括所述服务器的URI;
    所述代理设备通过TCP80端口向所述服务器发送所述第二HTTP请求;
    所述代理设备接收所述服务器发送的第五重定向消息,所述第五重定向消息包括所述服务器的URI,所述第五重定向消息用于指示所述UE与所述服务器建立TLS通道;
    所述代理设备与所述服务器建立TLS通道,包括:
    所述代理设备根据所述第五重定向消息,与所述服务器建立所述TLS通道;
    所述代理设备根据所述透明连接请求向所述UE发送第三重定向消息之前,还包括:当所述代理设备与所述服务器建立TLS通道成功时,所述代理设备确定所述服务器为要求采用单向认证的TLS接入的服务器。
  50. 根据权利要求49所述的方法,其特征在于,还包括:
    当所述代理设备与所述服务器建立TLS通道失败时,所述代理设备确定所述服务器为要求采用双向认证的TLS接入的服务器,以及所述代理设备向所述UE发送第二确定消息,所述第二确定消息用于指示所述UE通过TCP443端口连接到所述FQDN对应的所述服务器;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS。
  51. 根据权利要求49所述的方法,其特征在于,所述代理设备向所述服 务器发送所述第二HTTP请求之后,还包括:若所述代理设备未接收到所述服务器发送的第五重定向消息,则所述代理设备确定所述服务器不为要求采用单向认证的TLS接入的服务器和要求采用双向认证的TLS接入的服务器,以及所述代理设备接收所述服务器发送的第三确定消息;其中,所述双向认证的TLS为所述UE与所述服务器互相进行认证的TLS;
    所述代理设备向所述UE发送第六重定向消息,所述第六重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN对应的所述服务器以获取所述UE请求的URI对应的数据。
  52. 根据权利要求36-51任意一项所述的方法,其特征在于,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述代理设备与UE建立基于TCP8443端口的TCP连接之后,还包括:
    所述代理设备与所述UE建立TLS通道。
  53. 一种数据传输方法,其特征在于,包括:
    用户设备UE发送超文本传输协议HTTP请求,所述HTTP请求包括所述UE请求的统一资源标识符URI;
    所述UE通过业务处理设备接收代理设备发送的数据,所述数据为所述代理设备接收所述URI对应的服务器在接收到所述HTTP请求后通过所述代理设备与所述服务器之间的安全传输层协议TLS通道发送的。
  54. 根据权利要求53所述的方法,其特征在于,所述UE发送HTTP请求之前,还包括:
    所述UE发送传输控制协议TCP连接建立请求,所述TCP连接建立请求对应的互联网协议IP头中的目的IP地址为所述服务器的IP地址;
    所述UE接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
  55. 根据权利要求53所述的方法,其特征在于,所述UE发送HTTP请求之前,还包括:
    所述UE向所述代理设备发送传输控制协议TCP连接建立请求,所述TCP连接建立请求对应的IP头中的目的IP地址为所述代理设备的IP地址;
    所述UE接收所述代理设备发送的TCP连接建立响应,以与所述代理设备建立TCP连接。
  56. 根据权利要求55所述的方法,其特征在于,所述UE发送HTTP请求,包括:当所述URI指示所述UE不需要与所述服务器建立TLS通道时,所述UE向所述代理设备发送HTTP请求。
  57. 根据权利要求55所述的方法,其特征在于,所述UE与所述代理设备建立TCP连接之后,还包括:当所述URI指示所述UE需要与所述服务器建立TLS通道时,所述UE向所述代理设备发送透明连接请求,所述透明连接请求包括所述服务器的正式域名FDQN和TCP443端口号,所述透明连接请求用于指示所述UE请求连接到所述FQDN对应的所述服务器;
    所述UE接收所述代理设备发送的重定向消息,所述重定向消息包括所述服务器的FQDN和TCP80端口号,所述重定向消息用于指示所述UE通过TCP80端口连接到所述FQDN所对应的服务器以获取所述UE请求的URI对应的数据;
    所述UE发送HTTP请求,包括:所述UE根据所述重定向消息发送所述HTTP请求。
  58. 根据权利要求55-57任意一项所述的方法,其特征在于,当所述UE与所述代理设备建立基于TCP8443端口的TCP连接时,所述UE与所述代理设备建立基于TCP8443端口的TCP连接之后,还包括:
    所述UE与所述代理设备建立TLS通道。
PCT/CN2015/073946 2015-03-10 2015-03-10 数据传输方法和设备 WO2016141549A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580056399.8A CN107079048A (zh) 2015-03-10 2015-03-10 数据传输方法和设备
PCT/CN2015/073946 WO2016141549A1 (zh) 2015-03-10 2015-03-10 数据传输方法和设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/073946 WO2016141549A1 (zh) 2015-03-10 2015-03-10 数据传输方法和设备

Publications (1)

Publication Number Publication Date
WO2016141549A1 true WO2016141549A1 (zh) 2016-09-15

Family

ID=56878779

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073946 WO2016141549A1 (zh) 2015-03-10 2015-03-10 数据传输方法和设备

Country Status (2)

Country Link
CN (1) CN107079048A (zh)
WO (1) WO2016141549A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12010186B2 (en) 2020-09-30 2024-06-11 Telefonaktiebolaget L M Ericsson (Publ) Support of indirect communication with TLS

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112055037A (zh) * 2019-06-06 2020-12-08 深圳市尚云互联技术有限公司 Nat穿透连接方法及系统
CN114503644B (zh) * 2019-10-01 2024-05-14 瑞典爱立信有限公司 支持具有tls的间接通信

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767435A (zh) * 2004-10-26 2006-05-03 株式会社日立制作所 数据通信方法和系统
WO2008109847A2 (en) * 2007-03-08 2008-09-12 Mobilaps Llc Methods of placing advertisments, interstitials and toolbars in a web browser
CN102685165A (zh) * 2011-03-16 2012-09-19 中兴通讯股份有限公司 基于代理网关对访问请求进行控制的方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4520840B2 (ja) * 2004-12-02 2010-08-11 株式会社日立製作所 暗号化通信の中継方法、ゲートウェイサーバ装置、暗号化通信のプログラムおよび暗号化通信のプログラム記憶媒体
CN101141447B (zh) * 2006-09-08 2010-08-18 飞塔公司 Https通信隧道安全检查和内容过滤系统和方法
CN101141243A (zh) * 2006-09-08 2008-03-12 飞塔信息科技(北京)有限公司 一种对通信数据进行安全检查和内容过滤的装置和方法
US9736260B2 (en) * 2012-06-21 2017-08-15 Cisco Technology, Inc. Redirecting from a cloud service to a third party website to save costs without sacrificing security

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767435A (zh) * 2004-10-26 2006-05-03 株式会社日立制作所 数据通信方法和系统
WO2008109847A2 (en) * 2007-03-08 2008-09-12 Mobilaps Llc Methods of placing advertisments, interstitials and toolbars in a web browser
CN102685165A (zh) * 2011-03-16 2012-09-19 中兴通讯股份有限公司 基于代理网关对访问请求进行控制的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12010186B2 (en) 2020-09-30 2024-06-11 Telefonaktiebolaget L M Ericsson (Publ) Support of indirect communication with TLS

Also Published As

Publication number Publication date
CN107079048A (zh) 2017-08-18

Similar Documents

Publication Publication Date Title
US20200067903A1 (en) Integration of Publish-Subscribe Messaging with Authentication Tokens
KR102487923B1 (ko) 서비스들 - 사용자-평면 접근법에 대한 네트워크 토큰들을 이용한 효율적인 정책 집행
CN107534672B (zh) 一种促进网络客户端提供网络服务的方法、设备与系统
CN105024991B (zh) 用于在内容中心网络上交换双向流的方法和设备
US9485228B2 (en) Selectively performing man in the middle decryption
US9769126B2 (en) Secure personal server system and method
JP5933827B2 (ja) 機器同士の間の通信セッション転送
WO2016127914A1 (zh) 一种用于重定向的方法、装置及系统
TW480862B (en) Dynamic connection to multiple origin servers in a transcoding proxy
JP5739023B2 (ja) 割り当てられたネットワークアドレスを有するデバイスにアクセスするウェブプロキシサーバを使用したシステムおよび方法
CN107113319B (zh) 一种虚拟网络计算认证中应答的方法、装置、系统和代理服务器
US11196833B1 (en) Proxy server synchronizer
CN103108037B (zh) 一种通信方法,Web服务器及Web通信系统
US20140379932A1 (en) Setting up communication between a web application and a terminal
WO2016141549A1 (zh) 数据传输方法和设备
Cui Comparison of IoT application layer protocols
WO2017218013A1 (en) Secure personal server system and method
JP6393475B2 (ja) 通信アダプタ装置、通信システム、トンネル通信方法、及びプログラム
US9979722B2 (en) Method and apparatus for processing a RTCWEB authentication
KR101642665B1 (ko) 다이렉트 전자 메일
US10581979B2 (en) Information transmission method and apparatus
CN112470438B (zh) 用于发现中间功能和选择两个通信装置之间的路径的方法
CN106464603B (zh) 一种传输请求的方法及客户端
KR20140018980A (ko) 컴퓨터 네트워크에서 서버에 액세스하기 위한 서버, 시스템, 방법, 컴퓨터 프로그램 및 컴퓨터 프로그램 제품
Alliance Internet of Things protocol Comparison

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15884232

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15884232

Country of ref document: EP

Kind code of ref document: A1