Which protocol use Virtualbox proxy? - virtualbox

I go to File>Settings>Proxy and see just two editboxes for IP and port of proxy. Which protocol will be used? HTTP, SOCKS4, SOCKS5? This isn't written anywhere.

VirtualBox manual says:
The global settings dialog can be reached through the File menu,
selecting the Preferences... item. It offers a selection of settings
which apply to all virtual machines of the current user or in the case
of Extensions to the entire system: (...)
Proxy Enables the user to configure a HTTP Proxy Server.

Related

Postman Error: tunneling socket could not be established, statusCode=407

I am using the desktop version of Postman at a client site to test an API. However, I am unable to access any SSL sites in Postman, such as the Git Hib API: https://api.github.com/users/karlgjertsen
However, I can make the same API call through Chrome, so this is Postman specific.
I assume it is down to proxy settings, but I am not sure how to view or update these in Postman. Has anyone had any experienced something similar?
I turned OFF both Global Proxy Configuration and Use System Proxy in Settings->Proxy tab in Postman and it started to work.
This solved my issue :
The option "Respect HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables." was selected by default in the proxy settings. I turned off this option and it worked for me.
Follow these steps on postman -
Go to file=>Settings => Proxy (Tab) and uncheck the "Use System Proxy" checkbox. That should work
Posting as the other solutions presented in this thread did not work in our corporate environment. We have a proxy configured on the network which uses Windows Default Credentials (username and password) for authentication. For whatever reason the browser knows how to pass these details with each request but postman does not by default.
Solution was to update the Default Proxy Configuration under settings -> proxy -> Default Proxy Configuration -> Tick 'This proxy requires authentication' then enter Windows Username and Password. Leave Use the system proxy and Add a custom proxy configuration settings disabled.
From the Windows start menu go to Change proxy settings and configure the host and port there.
This turned out to be a local security policy that was applied to the machine in use. The local SSL proxy had a policy applied and it would not allow me to make a secure connection unless it was through a web browser.

Request a webservice behind a proxy on QT

Im trying to publish an application paper. My software is written in C++/QT and it usually calls some webservices by QNetworkRequest. One reviewer made the following comments:
"Could not fetch alignments behind a proxy server. Add option to set a
proxy for connecting to internet."
"When there is an institutional proxy, the application cannot connect
to internet. This is very common in many institutions. The application
should provide a way to set a proxy. I was unable to test the tasks
that require internet in Linux due to this problem."
I have no idea of what can I do to fix it, since I haven't access to any proxy server.
You can make a VM of any Linux and set up something like Squid proxy fairly easily. I do this at work so that I can authenticate with the corporate proxy via my Squid instance. This lets me route non-domain Windows and Linux VMs through it for updates.
Squid may emulate several of the proxy types supported by QNetworkProxy. Then you give the user of your program the option of supplying proxy configuration information that you pass to void QNetworkAccessManager::setProxy(const QNetworkProxy &proxy), which will route the request through the proxy.
You could also code the proxy usage into the code and ask the user to try it out until it works

Pyro.errors.ProtocolError: connection failed

I'm using OpenOPC library to connect to OPC servers. I can successfully write and read from my local Matrikon OPC server but when I try and read from another machine (different host) then I get the error Pyro.errors.ProtocolError: connection failed
My code for connection is here;
import OpenOPC
class OPC_tag_reader:
opc = OpenOPC.open_client('<remote host>')
#breaks here!!!!
def __init__(self):
print 'connecting to server'
self.opc.connect('Matrikon.OPC.Simulation.1', '<remote host')
The code does not get to the constructor.
Thanks!
OPC uses DCOM for communicating you need to perform the following steps to solve this issue.
Run the DCOM configuration utility by selecting Run from your Windows Start menu and type dcomcnfg.exe click on OK.
2.Expand Component Services, Computers and RightClick on the MyComputer and select Properties
Select the Tab Default Properties and Check the “Enable Distributed COM on this Computer”. The Default Authentication level should be Connect and the Default Impersonation level should be Identify. NOTE: Provide additional security for reference tracking should be unchecked.
Now select the COM Security Tab and under the Access Permissions section click on the Edit Defaults Button, Click on the Add… Button and add the user name (The newly created user name that is exactly same as that of user name on the server). After adding the New user select it and in the box below check the boxes to enable (Allow) Both Local Access and Remote Access.
For initial test purposes include Everyone in the Grant Access list.
On the machine where the server is add OpcEnum.exe to the firewall exception list
On the client machine's fire wall allow port 135 incoming coneciton
Note: For initial testing disable the firewall on both the server and the client .. :)
Note down the user ID and password of the windows user account under which the opc server is running and create the same user name and account on the remote machine (This is to establish trust between the two computers)

Define Outgoing/Calling Port for SOAP Web Service in Visual Studio 2010

The application application I'm currently working on is required to interface with a web service using SOAP. The service providers want to restrict access to the service via a firewall using BOTH an IP address and a Port. I'm using VS 2010 and the service has been added as a .NET 2.0 Web Service.
Right now the firewall rule for my connection's port is set to 'ANY' and the service team wants to tighten it down to a specific port. I can't seem to find any way to set a specific outgoing port (port used when exiting my web server) in my service.
Is it even possible to do this?
It is possible to do this, but it's a non-trivial customization.
See Ways to Customize your ASMX Client Proxy for the general techniques. Near the bottom, you'll find "Heavy-Duty Customization".
By overriding the GetWebRequest method, you can gain access to the HttpWebRequest instance being used by the request.
HttpWebRequest has a ServicePoint property.
ServicePoint has a BindIPEndPointDelegate property.
Set this property to point to a method that will decide which IP address and port to use.

HttpAddUrl on localhost fails for non-admin users

Using the Windows HTTP API I'm running a HTTP file server on localhost.
This involves calling HttpAddUrl(hRequestQueue, L"http://localhost:80/", NULL).
This fails with ERROR_ACCESS_DENIED unless the user runs the application as administrator. I need this functionality for users who don't have admin privileges. (What's wrong with a user running a localhost server anyway? It's just for the user themselves.)
I found a hotfix for Vista and XP which seems aimed at solving this, but there's nothing for Windows 7. The article implies it was fixed in Vista SP1, and I have Windows 7 SP1 and it's still a problem - did the fix not make it to Windows 7?
Is there anything else I can do to get the server to run for non-admins?
Answering my own question, but found a workaround: the IANA port numbers state ports 49152-65535 are for dynamic/private purposes. HttpAddUrl for localhost on a port >= 49152 works fine for non-admins.
This must be configured on system level because HTTP API uses http.sys (kernel driver). You can use netsh.exe command executed with Administrator privileges to grant access to the user or application:
netsh http add urlacl url=http://localhost:80/ user=EVERYONE listen=yes delegate=no
Ports 1-1024, by default, require administrative access. Otherwise you get error code 5 (ACCESS_DENIED). If you attempt to bind to a port above 1024, e.g.:
http://localhost:8080/
it will work for non-admin users. In your case you tried to listen on port 80, which HttpServer API limits to administrators.
Everything in Windows is controlled by Access Control Lists (ACLs); this includes the listen ports allowed when using HttpServer. You can display the current ACLs used by http by running:
>netsh http show urlacl
If you do that, you'll see a lot of ACLs already defined by various systems.
Windows Communication Foundation
One ACL entry is particularly interesting:
Reserved URL : http://+:80/Temporary_Listen_Addresses/
User: \Everyone
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;WD)
Everyone is granted the right to listen on port 80, as long as you live off of:
/Temporary_Listen_Addresses/
This url is used by Windows Communication Foundation (WCF), which normally constructs a URL of the form:
http://+:80/Temporary_Listen_Addresses/{random-guid}/
It also means, if you really want port 80, you can listen with your own, for example:
http://localhost:80/Temporary_Listen_Addresses/64E3DCC6-FE47-4A86-87F4-48D2E1B44AE9/
As long as nobody is already using port 80 (i'm looking at your Skype!), you'll get it.
WinSock listening sockets do not require admin
While the HttpServer API has ACLs controlling access to ports below 1024, it should be noted that the WinSock API has no restriction.
If you want to use WinSock to open a listening socket on port 80, you do not need to be an administrator. It is only the Http api that has the ACL.