Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Detect proxy network
Forum Updated to NodeBB v4.3 + New Features

Detect proxy network

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 847 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Beemaneni Bala
    wrote on 23 Mar 2018, 20:29 last edited by
    #1

    Hi
    How to detect proxy network in c++ ?
    I was asked to use like below.
    QNetworkProxyFactory::setUseSystemConfiguration(true);
    The above is asking to use system config for connecting to network.
    Have many questions. I am using Wifi to connect to network

    1. How do i detect the selected ssid is proxy network ?
    2. If selected network is proxy , how do i set username and password ?
      i believe the credentials needs to be written to wpa_supplicant file.
      If someone can post the piece of code for the requirement, would be helpful
    1 Reply Last reply
    0
    • W Offline
      W Offline
      wrosecrans
      wrote on 23 Mar 2018, 22:47 last edited by
      #2

      Whether you need to use a proxy server or not has nothing to do with authenticating to a wireless network. It sounds like you are mixing up the two concepts. WPA and SSID's are for connecting to a wireless network, and setting up a QNetworkProxy won't help with that. You must already be joined to the network before you can use that network to connect to a proxy server.

      In most cases, you won't need to worry about credentials for connected to the Wifi network. The user will be expected to join it themselves.

      How do i detect the selected ssid is proxy network ?

      In general, you can't. It's not even a property of the network. You may be able to access internal resources without going through a proxy, but need to connect to a proxy to get to external sites, etc. People may set up PAC, or just require users to enter proxy settings manually. It's pretty much impossible to distinguish between failing to connect to a host because something is broken, and failing to connect to a host because the network administrator wants you to connect to it through some proxy.

      If selected network is proxy , how do i set username and password ?

      If you are using setUseSystemConfiguration(true), you would just expect the user to configure their machine correctly and put any required credentials in the system's settings.

      If you don't want to use the system proxy settings, you would be responsible for how you keep track of proxy credentials, and how you let the user configure your software.

      1 Reply Last reply
      0

      1/2

      23 Mar 2018, 20:29

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved