Is ist possible to send POST requests to ipv6 addresses using the ifttt.com service?
I found the maker channel but it doesn't seem to work (with ipv6 addresses).
Here the request I want to send to my openhab system:
POST
http://[xyyx:yxy:yxy:yxyx:yxyx:yxyx:yxyx:yxyx]:8080/rest/items/Kueche
Content-Type: text/plain
Body: TOGGLE
I have the same problem, want to use Maker with IPv6 address. Don't seems to work, neither passing a domain that only resolves to an IPv6 address.
I have done a workaround, using Google App Engine (it has IPv6 support) as a proxy for my IFTTT Maker requests.
The code is pretty ugly, just a POC:
https://gist.github.com/6f9e67fe47c67eca46655b8033bcf862
In the Maker "that" is set the URL like this:
https://miappid.appspot.com/?query=data&ipv6=http://home.duckdns.org
The app deployed in GAE take the parameters of the query (except ipv6), content-type header and body, and create a new request to the addres specified in the ipv6 param.
Related
I'm fiddling a bit with Azure API Management Gateway to see if it would fit our purpose.
It was quite simple to add an API from our ERP application (Saas app with IP whitelisting our Office locations) and I'm able to call it from within our office.
However, when I call the api from any other location, I get the message from the ERP that the IP is blocked.
I'm currently on a Development tier and (should) have a static IP assigned let's say
VIP public: 20.82.86.xxx
What I've done so far:
added a inboud policy, stripping the x-forwarded-for header, tried both API level and operation level
<inbound>
<base />
<set-header name="X-Forwarded-For" exists-action="delete" />
What I've tested/noticed so far:
When I test the call from within APIM, the IP is blocked. I can see that the header is stripped on inbound
set-header (0.008 ms)
"Header X-Forwarded-For was removed."
I see that APIM is adding a x-forwarded-for header in backend, seems with the IP of the frontend/APIM website
{"name": "X-Forwarded-For","value": "13.91.254.xxx"}
The response I get back is that the ip from my device (84.105.xxx.xxx) is blocked by the ERP
I don't understand why the originating IP is the local IP from my device/location instead of the API Gateway.
Azure API Managemnent gateway seems to be very useful for our purpose and it's not that difficult the work with. However it's important that I can call it from other locations than our office.
Any ideas?
I tested setting an explicit value for the X-Forwarded-For header like this in the inbound policy:
<set-header name="X-Forwarded-For" exists-action="override">
<value>xx.xx.xx.xx</value>
</set-header>
Then the resulting header in the backend request was:
X-Forwarded-For: xx.xx.xx.xx,yy.yy.yy.yy
This might fool your backend to think that xx.xx.xx.xx is your client IP, when it is really yy.yy.yy.yy.
If you have added any such header exclusively before forwarding the request to the backend via policy, it can be removed via policy.
But the X-Forwarded-For header being added by the APIM gateway by default cannot be eliminated since this is by design and is required by the service to accurately forward the request to the backend API.
https://www.geeksforgeeks.org/http-headers-x-forwarded-for/
How would I disable DNS filtering in a UIWebView?? I have a website which has to be viewed on a particular wi-fi and has DNS filtering which I want to bypass. Thanx, SebOH.
This doesn't really have anything to do with UIWebView, but more the type of DNS filtering that your network has in place. There could be tons of ways that the DNS is being filtered.
Here are a few possible methods off of the top of my head:
1. "Dumb Filtering"
In this case, iOS automatically requests the DNS server to be used from the gateway. The gateway can then provide a DNS server that filters requests. This is extremely easy to bypass. By simply going to the WiFi settings and setting the DNS server manually, the phone will no longer ask the gateway for the DNS server and instead use whichever server you specify. (Google is 8.8.8.8)
2. "Smart Filtering"
This is where you must get a little creative. In smart filtering, the gateway actually analyzes DNS packets as they're sent, and if it detects a request for a blocked website, it doesn't let the packet through. This can be difficult to bypass. You would have to somehow obtain the IP address registered with a domain name using a different protocol, like HTTP or some custom design. You'd probably need to employ your own server in this method.
Say the user tries to go to twitter.com. In your delegate method (or wherever you load pages from), you could send an HTTP POST request to your server with an unfiltered DNS (assuming the gateway doesn't filter your server's domain), which would then reply with the corresponding IP address for twitter.com. Then, you could navigate the UIWebView directly to the IP address. Something like so:
NSString *api_response = [YourAPI requestIPFromServer:#"http://yourserver.com/api" withDomain:#"twitter.com"];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:api_response]];
[myWebView loadRequest:request];
Hopefully that helps, but this is kind of a vague question.
Every time I send a API request to my server I want send informations like device type and OS version (from my mobile app). My first thought is to use User Agent but I wonder if there's any benefits to use custom http header like "X-deviceType" or/and "X-osVersion" instead.
I am using the X-Device HTTP Header.
Works well for the most part, however I have noticed that some requests from behind a proxy seem to be stripping the data from that header.
I'm attempting to test a real-time Instagram stream using the Subscription API, but am having trouble setting up subscriptions for local testing.
I attempted using localhost:8080 for the callback_url and editing my /etc/hosts file (redirecting localhost to local.machine.com)
Eventually, I was able to set up a subscription to my home's IP address to receive callbacks from Instagram.
The IP address was in the form:
xxx.xxx.xxx.xx:8080
However, this morning, I was trying from a different IP address in the form xxx.xxx.x.xx:8080 which has continuously led to Instagram returning 400: Bad Request: Invalid URL
Does anybody have any insight as to what Instagram treats as a valid URL parameter for subscriptions?
I would recommend ngrok for this.
It allows you to set up a tunnel between your local machine and the internet.
With ngrok you can on the command line do like this:
ngrok http 8080
That will give you a url like this: http://something.ngrok.io. In your terminal window you can also inspect all traffic through this tunnel.
I have a web server hosted with 1and1 which evidently is hosted in Germany, so if I try to do a xmlhttp get on data from google or facebook I am presented with German return data as their site presumes I am a German user.
Does anyone know if it is a server setting which needs to be changed or is facebook recognising the IP location?
if the resource is available in two or many languages, the server mast decide which version to serve. he does this often by examining Accept-Language HTTP header. Probably the header in the request issued by yur server says that it accepts any language, so the server prefers to send german not english due to your srever's IP. Try to add the header menually to your request:
Accept-Language: en
so your ajax will look like this:
xmlhttpobject.setRequestHeader('Accept-Language', 'en');