Delphi: EmbeddedWB weird proxy error? - delphi

This is my Form1.FormCreate code:
GoodWB:=TEmbeddedWB.Create(Form1);
TWinControl(GoodWB).Name :='NetPartBmb';
TWinControl(GoodWB).Parent := Form1;
GoodWB.SetBounds(0,50,300,300);
//GoodWB.ProxySettings.SetProxy('','83.137.53.190:8080','<local>');
//GoodWB.ProxySettings.AutoLoadProxy:=true;
GoodWB.Navigate('www.google.com');
EmbeddedWB performs weirdly. When I try to load a page it throws an error like if I was not online.
But if I uncomment those proxy settings (The proxy 83.137.53.190:8080 is a fully functionating proxy btw) then it works, but with that proxy. It seems like it uses some unknown proxy. How can I disable the proxy and work with my own IP?
BTW: This wasn't happening before and I have also been setting proxies with it before but then I have removed all the proxy code parts so I have no idea what is causing this when there are no codes for proxy settings.

I don't know how TEmbeddedWB works, but in TWebBrowser you have to pass a full URL to Navigate(), not just the hostname by itself:
GoodWB.Navigate('http://www.google.com');
If you want to connect to an IP address instead of a hostname, you still would need to specify the protocol scheme:
GoodWB.Navigate('http://TheIPHere');

Related

PAC FILE - Not being loaded

I am new to pac files. I am not sure I made it working.
I installed an nginx on a virtual machine. and exposed a pac file to url.
(I can easily download pac file by puting url in browser as proof it is working).
I then set my computer proxy settings as explained in many guides. I ticked the automatic proxy settings and I then put pac file url.
After that I think the file is not being loaded.
puting : "chrome://net-internals/#proxy" gives an empty list while it should show the pac file. Plus the net seems to work as the pac is not even there.
For further information, since I am new to pac file, I am just testing a simple pac file which redirect ALL traffic to youtube.com.
can anyone help me out?
Thanks
function FindProxyForURL(url, host) {
return "youtube.com";
The format to return is something like return "PROXY youtube.com:80". However I do not think this will work, as Youtube is not a proxy.
PAC files must return a Proxy. But Youtube is just a site, which is something completely different than a Proxy.
PAC files are unable to replace a Proxy. All they do is to point to the proxy to use when you want to reach some specific URL. This way you can configure how to reach certain networks, like some Extranet (via some dedicated HTTP proxy or TOR or I2P (via SOCKS proxies). This is why you also must specify the type of the Proxy used and the port number where the Proxy sits. Just a name usually is not enough.
Also note that you can give more than just one Proxy. For more information on PAC-files see the main documentation:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file
(Sorry for the link, but if a Link to MDN ever breaks, the Net probably has some bigger trouble than just this broken link.)

Is it possible to share my localhost with someone on a different network?

I am working with a designer and I'd like them to have access to the interactions I've implemented on the site we're working on. However this time, I have 2 issues. My localhost is configured to a subdomain:
http://store.teststore:3000/ and we're on different networks. Is there anyway to work around this?
ngrok should work for you. Download and install it following these instructions here: https://ngrok.com/download. Documentation on how it is used can be found here https://ngrok.com/docs. Once installed running the below command should work for you (depending on the hosting environment):
ngrok http -host-header=rewrite store.teststore:3000
You will need to give the URL generated by ngrok and displayed in the cmd prompt to the designer.
Update: Handling absolute redirects
Based on your comment it sounds like, after login, your site does an absolute redirect (the full URL is specified). If it is possible I would change your code to do a relative redirect where the domain is omitted. You could also make your root domain configurable in the absolute redirect and configure it to be the ngrok domain provided for now. Lastly, you could attempt to configure your DNS with a CNAME record following ngroks Tunnels to custom domains documentation. This last option, however, requires a paid for ngrok subscription.
Install ngrok if you haven't yet and CD into your project directory and invoke ngrok. Note Your application must be running locally on the same port number ngrok will be running.

Should iOS Universal Links work over custom ports?

I am trying to get iOS Universal Links to work for https://my-domain.com:4443 (i.e. over SSL, but with a custom port number; not the conventional 443 port), but it isn't working.
I'm pretty confident I didn't do anything wrong, since my initial setup worked fine over port 443, and I simply changed the server port to 4443 to test the idea. In fact, I also added support for applinks:my-domain.com:4443 in my Xcode project (I tried both with and without the port, without any luck).
I am asking the question, because I couldn't find anything on the subject in the official documentation.
This is expected behavior. There is nothing in the official documentation about supporting non-standard ports because non-standard ports aren't supported.
The only entitlement value allowed by iOS is a valid, bare domain (applinks:my-domain.com), which iOS will then use to check for an AASA file over SSL using the standard HTTPS port. In other words, when iOS queries either https://my-domain.com/apple-app-site-association or https://my-domain.com/.well-known/apple-app-site-association, it needs to find your AASA file without any redirects.

URL pattern to include in JMeter for testing ASP.NET MVC website

I am trying to perform a load test with JMeter on my ASP.NET MVC website that I have published on IIS..
My problem is..I'm confused about what URL pattern should I include or exclude..Currently, URL is immaterial for me, so I tried with '.* ' in URL to include and nothing in URL to exclude.. But JMeter is recording only a jpg url...If I specify '.*\.jpg ' in exclude, it records nothing. I also tried '.*\.aspx ' in include and nothing in exclude, but that doesn't seem to be working either :(
Is this something MVC specific? I am not very sure how it handles urls..(I am doing all this for the first time..). I otherwise didn't have any issues recording steps on other servers like google,apache.jmeter.test etc. where there were normal html pages with my current JMeter settings:
A Thread Group called 'Users' having a
Recording Controller
HTTP request defaults pointing to localhost:9080
A Workbench with
HTTP Proxy Server pointing to localhost:9080
My connection setting is also on localhost:9080.
I'm running JMeter from behind my company's proxy server successfully.
Thanks for any help :)
Realized later that it was not about URLs as such. My browser setting was probably faulty. I was using IE8..When I switched to Firefox, got more fine-grained control on the settings..These settings before recording worked for me:
Set manual proxy configuration to localhost,8081.
Check 'Use this proxy for all protocols'
Leave 'No proxy for' field blank
No 'Automatic proxy configuration'
Click OK.
After this if you try to access your site on IIS while JMeter proxy server hasn't started yet, it wouldn't, saying the connection was refused.
After this, go to JMeter and click the Start button to record. Try acessing the site again. It should come up :) Some more details:
There was no need to specify port number in HTTP request defaults. Just specified it in HTTP proxy server (8081 in my case).
For the session information to be saved properly, you must use a cookie manager (preferably, keep it at the top)..When you record, you get a HTTP header manager under each HTTP request if you had ticked the chekcbox against "Capture HTTP headers" in HTTP Proxy Server before recording..Copy this and add it as a child under your thread group.
Hope this helps someone struggling like me :)

JavaFX url-proxy?

My computer is running behind proxy. I want to access url from JavaFX. for example say i want to show image from a url. But i haven't seen anyway to provide proxy settings for the connection(?). Please if someone can tell me how to do things in such situation?
Thanks
As link in accepted answer doesn't work anymore I'm adding proxy setting code here:
System.setProperty("http.proxyHost", "myproxyhost");
System.setProperty("http.proxyPort", "80");
By default, JavaFX will automatically use your Operating Systems proxy settings, this is controlled via the Java Preferences or Java Control panel icons on your Mac or PC.
You can also set, within Java, the proxy environment variables, but I haven't tried this.
If you are trying to request an external resource from an unsigned application, Java may prompt you (the user) for permission when it runs.
Setting proxy in Java/FX

Resources