CN108462701B - Hotspot-free shared mobile phone network surfing system and method - Google Patents

Hotspot-free shared mobile phone network surfing system and method Download PDF

Info

Publication number
CN108462701B
CN108462701B CN201810145274.8A CN201810145274A CN108462701B CN 108462701 B CN108462701 B CN 108462701B CN 201810145274 A CN201810145274 A CN 201810145274A CN 108462701 B CN108462701 B CN 108462701B
Authority
CN
China
Prior art keywords
program module
client terminal
virtual network
tun
mobile phone
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810145274.8A
Other languages
Chinese (zh)
Other versions
CN108462701A (en
Inventor
范晔斌
卢超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Carbit Information Co ltd
Original Assignee
Wuhan Carbit Information Co ltd
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 Wuhan Carbit Information Co ltd filed Critical Wuhan Carbit Information Co ltd
Priority to CN201810145274.8A priority Critical patent/CN108462701B/en
Publication of CN108462701A publication Critical patent/CN108462701A/en
Application granted granted Critical
Publication of CN108462701B publication Critical patent/CN108462701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Abstract

The invention relates to a hotspot-free shared mobile phone network surfing system which comprises a network sharing program module and a virtual network card in a client terminal and a surfing agent program module in a mobile phone, wherein a first data communication end of the network sharing program module is connected with a data communication end of the virtual network card, and a second data communication end of the network sharing program module is connected with a data communication end of the surfing agent program module. According to the invention, the network sharing program module and the virtual network card of the client terminal and the internet agent program module of the mobile phone are adopted to realize the internet access of the shared mobile phone network, and the hot spot is not set on the mobile phone in the internet access process, so that the application program of the client terminal can directly access the internet through the shared mobile phone network without setting the hot spot on the mobile phone.

Description

Hotspot-free shared mobile phone network surfing system and method
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a hotspot-free shared mobile phone network surfing system and method.
Technical Field
With the development of technology, individuals have a large number of intelligent terminals, and the terminals have the capability of surfing the Internet, but are limited by various conditions and cannot access the Internet. On the other hand, the mobile phone is the most popular intelligent device and the most extensive internet access device. Therefore, it is a natural idea that a network sharing a mobile phone is used for an intelligent terminal to surf the internet of the terminal, the current implementation scheme is based on a mobile phone hotspot mode, the mobile phone hotspot needs to be opened manually, and the automatic hotspot opening function needs root (system user and authority) authority, so that the development of common APP (Application) is difficult to implement.
Disclosure of Invention
The invention aims to provide a hotspot-free shared mobile phone network surfing system and a hotspot-free shared mobile phone network surfing method, and the system and the scheme improve the convenience of shared mobile phone network surfing.
In order to achieve the purpose, the hotspot-free shared mobile phone network surfing system is characterized by comprising a network sharing program module and a virtual network card in a client terminal and a surfing agent program module in a mobile phone, wherein a first data communication end of the network sharing program module is connected with a data communication end of the virtual network card, and a second data communication end of the network sharing program module is connected with a data communication end of the surfing agent program module;
the virtual network card is used for acquiring all IP (Internet Protocol, Protocol for interconnection between networks) data packets communicated with the external network of the client terminal local machine;
the network sharing program module is used for forwarding the IP data packet to an internet agent program module of the mobile phone;
the internet agent program module is used for finishing data communication with a destination address in the IP data packet by taking the address of the internet agent program module as a source address and sending a data packet responded by a far end back to the network sharing program module;
the network sharing program module is further configured to perform packet processing on the received remote response data by using a TCP/IP (Transmission Control Protocol/Internet Protocol ) Protocol to obtain a corresponding IP remote response data packet, and write the IP remote response data packet into a virtual network card of the client terminal.
A hotspot-free shared mobile phone network surfing method is characterized by comprising the following steps:
step 1: the network sharing program module of the client terminal establishes a data link with the internet agent program module of the mobile phone;
step 2: a network sharing program module of the client terminal establishes a virtual network card in the client terminal;
and step 3: a virtual network card of a client terminal acquires all IP data packets communicated with an external network of a local machine of the client terminal;
and 4, step 4: the network sharing program module of the client terminal forwards the IP data packet to an internet agent program module of the mobile phone through the data link established in the step 1;
and 5: the internet agent program module of the client terminal completes the data communication with the destination address in the IP data packet by taking the address of the client terminal as the source address, and sends the data packet responded by the far end back to the network sharing program module of the client terminal through the data link in the step 1;
step 6: the network sharing program module of the client terminal carries out packet processing on the received remote response data by utilizing a TCP/IP protocol to obtain a corresponding IP remote response data packet, and writes the IP remote response data packet into a virtual network card of the client terminal;
and 7: and the virtual network card sends the IP far-end response data packet to a corresponding application program module in the client terminal.
According to the invention, the network sharing program module and the virtual network card of the client terminal and the internet agent program module of the mobile phone are adopted to realize the internet access of the shared mobile phone network, and the hot spot is not set on the mobile phone in the internet access process, so that the application program of the client terminal can directly access the internet through the shared mobile phone network without setting the hot spot on the mobile phone. The method solves the problem that the mobile phone hot spot needs to be opened manually or automatically through root permission setting in the existing scheme, facilitates the setting process of the client terminal for surfing the internet through a peripheral mobile phone, and reduces the design difficulty of an application program in the client terminal.
Drawings
FIG. 1 is a block diagram of the present invention.
The system comprises a client terminal 1, a network sharing program module 2, a mobile phone 3, an internet agent program module 4, a virtual network card 5 and an application program module 6.
Detailed Description
The invention is described in further detail below with reference to the following figures and specific examples:
the invention relates to a hotspot-free shared mobile phone network surfing system, which comprises a network sharing program module 2 and a virtual network card 5 in a client terminal 1 (intelligent surfing equipment such as a mobile phone, a tablet, a navigator and the like) and a surfing agent program module 4 in a mobile phone 3, wherein a first data communication end of the network sharing program module 2 is connected with a data communication end of the virtual network card 5, and a second data communication end of the network sharing program module 2 is connected with a data communication end of the surfing agent program module 4;
the virtual network card 5 is used for acquiring all IP data packets communicated with the external network of the client terminal 1;
the network sharing program module 2 is used for forwarding the IP data packet to an internet agent program module 4 of the mobile phone 3;
the internet agent program module 4 is used for completing data communication with a destination IP address in the IP data packet by taking the IP address of the internet agent program module as a source address, and sending a data packet responded by a far end back to the network sharing program module 2;
the network sharing program module 2 is further configured to perform packet processing on the received remote response data by using a TCP/IP protocol to obtain a corresponding IP remote response data packet, and write the IP remote response data packet into the virtual network card 5 of the client terminal 1.
In the above technical solution, the virtual network card 5 is further configured to send the IP remote response packet to a corresponding application module 6 in the client terminal 1.
In the above technical solution, the second data communication terminal of the network sharing program module 2 is connected to the data communication terminal of the internet agent program module 4 through a USB (Universal Serial Bus) device, a bluetooth device, or a wifi (Wireless-Fidelity).
In the above technical solution, the virtual network card 5 is a TUN (point-to-point device)/TAP (ethernet device) virtual network device. The TUN/TAP virtual network device provides the transmitting and receiving capability of network data packets for a user space program, and not only Linux supports the TUN/TAP virtual network device, but also other UNIX (time-sharing operating system) supports the TUN/TAP virtual network device. Has good device compatibility.
In the above technical solution, the internet agent program module 4 is only a common network application, and does not need any special authority, thereby facilitating development and deployment of program development.
A hotspot-free shared mobile phone network surfing method comprises the following steps:
step 1: the network sharing program module 2 of the client terminal 1 establishes a data link with the internet agent program module 4 of the mobile phone 3;
step 2: the network sharing program module 2 of the client terminal 1 establishes a virtual network card 5 in the client terminal 1;
and step 3: the virtual network card 5 of the client terminal 1 acquires all IP data packets (from each application program APP in the client terminal 1) communicated with the external network of the local machine of the client terminal 1;
and 4, step 4: the network sharing program module 2 of the client terminal 1 forwards the IP data packet to an internet agent program module 4 of the mobile phone 3 through the data link established in the step 1;
and 5: the Internet agent program module 4 of the client terminal 1 completes data communication with a destination IP address in the IP data packet by using its own IP address as a source address, and sends a data packet (response data on the Internet) of a remote response back to the network sharing program module 2 of the client terminal 1 through the data link in the step 1;
step 6: the network sharing program module 2 of the client terminal 1 performs packet processing on the received remote response data by using a TCP/IP protocol to obtain a corresponding IP remote response data packet, and writes the IP remote response data packet into a virtual network card 5 of the client terminal 1;
and 7: the virtual network card 5 sends the IP remote response packet to the corresponding application module 6 in the client terminal 1.
In the above technical solution, the virtual network card 5 is a TUN/TAP virtual network device, and a character device TUN (TUN network card) in the TUN/TAP virtual network device is used as an interface for exchanging data between a user space and a kernel space. When the kernel sends an IP packet to the TUN/TAP virtual network device, the IP packet is held in a queue associated with the TUN/TAP virtual network device until it is read by the descriptor of the open character device TUN, which is copied to the buffer in user space. The effect is equivalent to that the IP packet is sent directly to the user space. The principle is similar when sending a packet by system call write.
In step 2 of the above technical solution, the method for establishing a virtual network card 5 in the client terminal 1 by the network sharing program module 2 is to add a driver of the TUN/TAP virtual network device and a character device TUN associated with the driver in the kernel of the operating system (Linux system) of the client terminal 1. The location of the character device tun is under the net folder of the dev directory of the client terminal operating system.
The invention mainly utilizes the characteristic of the linux virtual network card to carry out communication, and only one common application network program (an internet agent program module 4) needs to be operated on the mobile phone 3.
The invention can realize the normal internet function of the application of the client terminal, and the mobile phone providing the shared internet does not need to make any special setting, and only needs to run an App with the common internet access authority. For a user, the potential safety hazards such as privacy leakage caused by overhigh application authority are not worried, for a developer, a privileged API is not required to be called, development difficulty is reduced, system integration is facilitated, and applications are put on shelf.
Details not described in this specification are within the skill of the art that are well known to those skilled in the art.

Claims (5)

1. A hotspot-free shared mobile phone network surfing system is characterized by comprising a network sharing program module (2) and a virtual network card (5) in a client terminal (1) and a surfing agent program module (4) in a mobile phone (3), wherein a first data communication end of the network sharing program module (2) is connected with a data communication end of the virtual network card (5), and a second data communication end of the network sharing program module (2) is connected with a data communication end of the surfing agent program module (4);
the virtual network card (5) is used for acquiring all IP data packets communicated with the external network of the client terminal (1);
the network sharing program module (2) is used for forwarding the IP data packet to an internet agent program module (4) of the mobile phone (3);
the internet agent program module (4) is used for finishing data communication with a destination address in the IP data packet by taking the address of the internet agent program module as a source address and sending a data packet responded by a remote end back to the network sharing program module (2);
the network sharing program module (2) is further configured to perform packet processing on the received remote response data by using a TCP/IP protocol to obtain a corresponding IP remote response data packet, and write the IP remote response data packet into a virtual network card (5) of the client terminal (1);
the virtual network card (5) is a TUN/TAP virtual network device, and a character device TUN in the TUN/TAP virtual network device is used as an interface for exchanging data between a user space and a kernel space;
when the kernel sends an IP packet to the TUN/TAP virtual network device, the IP packet is stored in a queue associated with the TUN/TAP virtual network device until it is read by the descriptor of the open character device TUN by the user space program, it is copied to the buffer of the user space;
the method for establishing the virtual network card (5) in the client terminal (1) by the network sharing program module (2) is that a driver of the TUN/TAP virtual network equipment and a character equipment TUN associated with the driver are added in the kernel of the operating system of the client terminal (1), and the position of the character equipment TUN is under a net folder of a dev directory of the operating system of the client terminal.
2. The hotspot-free shared mobile phone network surfing system of claim 1, wherein: and the virtual network card (5) is also used for sending the IP remote response data packet to a corresponding application program module (6) in the client terminal (1).
3. The hotspot-free shared mobile phone network surfing system of claim 1, wherein: and the second data communication end of the network sharing program module (2) is connected with the data communication end of the internet agent program module (4) through USB equipment or Bluetooth equipment or wifi equipment.
4. A hotspot-free shared mobile phone network surfing method is characterized by comprising the following steps:
step 1: a network sharing program module (2) of a client terminal (1) establishes a data link with an internet agent program module (4) of a mobile phone (3);
step 2: a network sharing program module (2) of a client terminal (1) establishes a virtual network card (5) in the client terminal (1);
and step 3: a virtual network card (5) of a client terminal (1) acquires all IP data packets communicated with an external network of a local machine of the client terminal (1);
and 4, step 4: a network sharing program module (2) of the client terminal (1) forwards the IP data packet to an internet agent program module (4) of the mobile phone (3) through the data link established in the step (1);
and 5: the internet agent program module (4) of the client terminal (1) completes data communication with a destination address in the IP data packet by taking the address of the internet agent program module as a source address, and sends a data packet of a remote response back to the network sharing program module (2) of the client terminal (1) through the data link in the step 1;
step 6: the network sharing program module (2) of the client terminal (1) carries out packet processing on the received remote response data by utilizing a TCP/IP protocol to obtain a corresponding IP remote response data packet, and writes the IP remote response data packet into a virtual network card (5) of the client terminal (1);
and 7: the virtual network card (5) sends the IP far-end response data packet to a corresponding application program module (6) in the client terminal (1);
the virtual network card (5) is a TUN/TAP virtual network device, and a character device TUN in the TUN/TAP virtual network device is used as an interface for exchanging data between a user space and a kernel space;
when the kernel sends an IP packet to the TUN/TAP virtual network device, the IP packet is stored in a queue associated with the TUN/TAP virtual network device until it is read by the descriptor of the open character device TUN by the user space program, it is copied to the buffer of the user space;
the method for establishing the virtual network card (5) in the client terminal (1) by the network sharing program module (2) is that a driver of the TUN/TAP virtual network equipment and a character equipment TUN associated with the driver are added in the kernel of the operating system of the client terminal (1), and the position of the character equipment TUN is under a net folder of a dev directory of the operating system of the client terminal.
5. The hotspot-free shared mobile phone network surfing method of claim 4, wherein the hotspot-free shared mobile phone network surfing method comprises the following steps: in the step 2, the method for the network sharing program module (2) to establish a virtual network card (5) in the client terminal (1) is to add a TUN/TAP virtual network device driver and a character device TUN associated with the driver in the kernel of the operating system of the client terminal (1).
CN201810145274.8A 2018-02-12 2018-02-12 Hotspot-free shared mobile phone network surfing system and method Active CN108462701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810145274.8A CN108462701B (en) 2018-02-12 2018-02-12 Hotspot-free shared mobile phone network surfing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810145274.8A CN108462701B (en) 2018-02-12 2018-02-12 Hotspot-free shared mobile phone network surfing system and method

Publications (2)

Publication Number Publication Date
CN108462701A CN108462701A (en) 2018-08-28
CN108462701B true CN108462701B (en) 2021-06-01

Family

ID=63216964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810145274.8A Active CN108462701B (en) 2018-02-12 2018-02-12 Hotspot-free shared mobile phone network surfing system and method

Country Status (1)

Country Link
CN (1) CN108462701B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525639A (en) * 2018-10-16 2019-03-26 深圳市点嘀互联网络有限公司 Vehicle electronic device connects the method that smart phone realizes online by USB line
CN109669737B (en) * 2018-12-19 2023-04-18 百度在线网络技术(北京)有限公司 Application processing method, device, equipment and medium
CN113242261B (en) * 2021-06-10 2023-04-07 Oppo广东移动通信有限公司 Method and device for sharing data network, electronic equipment and storage medium
CN113595777B (en) * 2021-07-23 2024-01-23 上海商米科技集团股份有限公司 Network sharing method and system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557420B (en) * 2009-03-31 2012-07-25 北京航空航天大学 Realization method of high-efficiency network communication of a virtual machine monitor
US8565108B1 (en) * 2010-09-28 2013-10-22 Amazon Technologies, Inc. Network data transmission analysis
CN102170473A (en) * 2011-04-21 2011-08-31 中兴通讯股份有限公司 Resource sharing system, mobile terminal and resource sharing method
CN102594926B (en) * 2011-12-22 2015-04-22 华中科技大学 Heterogeneous wireless peer-to-peer (P2P) network file sharing system and file transmission acceleration method
CN103532802A (en) * 2013-10-11 2014-01-22 小米科技有限责任公司 Method and device for network sharing, and terminal equipment
CN104582011B (en) * 2013-10-18 2019-10-18 卓易畅想(北京)科技有限公司 A kind of method and apparatus for mobile terminal to be connected to network
CN104333867A (en) * 2014-12-02 2015-02-04 上海斐讯数据通信技术有限公司 Method and device for sharing PC network by virtue of mobile phone
CN107666426A (en) * 2016-07-28 2018-02-06 湖南移商动力网络技术有限公司 A kind of IPv6 access systems of Android platform
CN106255085B (en) * 2016-07-29 2019-09-10 武汉虹信通信技术有限责任公司 Multi-media dispatcher integrated approach for EPC system
CN107332872A (en) * 2017-05-23 2017-11-07 成都联宇云安科技有限公司 A kind of method that Android device network agile management and control is realized based on VPN connections

Also Published As

Publication number Publication date
CN108462701A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
CN108462701B (en) Hotspot-free shared mobile phone network surfing system and method
JP4917036B2 (en) System and method for communicating with a general purpose integrated circuit card in a mobile device using an internet protocol
TWI244295B (en) Method and system for simulating multiple independent client devices in a wired or wireless network
JP6611921B2 (en) Terminal interconnection method, apparatus, nonvolatile computer storage medium, and computer program
EP2597577B1 (en) Ethernet base and network system
WO2005089139A2 (en) Remote usb port system and method
CN104869043B (en) A kind of method and terminal for establishing VPN connection
CN111327758A (en) Camera sharing method and device
CN111385238B (en) Data transmission method and device
US20160036870A1 (en) Session managing method, session managing system, and call processing method
CN103095850B (en) Method and system for sharing network by mobile terminal through computer
JP2016086219A (en) Relay device, relay system, relay method and program
WO2023185130A1 (en) Data forwarding apparatus and method, electronic device, and storage medium
CN109525639A (en) Vehicle electronic device connects the method that smart phone realizes online by USB line
CN103220283A (en) Method, equipment and system for network sharing
JP6665190B2 (en) Network sharing implementation method and apparatus
CN103812664A (en) Network sharing method and device
CN114697388B (en) Data transmission method and device
US10666492B1 (en) Method and apparatus of providing emergency communication services
CN109587749A (en) Data transmission method for uplink and system
JP2003198561A (en) Method for mobile network access
CN112996137A (en) Method for establishing data connection on multi-operation system terminal
CN113014679B (en) Communication method, device and system
CN112448878B (en) PPPoE transparent transmission method, PPPoE server and electronic equipment
JP6061480B2 (en) Communication device control method and communication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A system and method for sharing mobile phone network without hot spots

Effective date of registration: 20230222

Granted publication date: 20210601

Pledgee: Wuhan area branch of Hubei pilot free trade zone of Bank of China Ltd.

Pledgor: WUHAN CARBIT INFORMATION Co.,Ltd.

Registration number: Y2023420000064

PE01 Entry into force of the registration of the contract for pledge of patent right