I need to know, if it is possible to connect with Mikrotik script to TCP/IP Websocket to transfer some data e.g. with PC or PLC (which can provide server socket).
Thanks for any answer.
You can use /tool fetch to download files from remote server with http, https , ftp or tftp protocol. Then you can parse downloaded file to extract variables. see https://wiki.mikrotik.com/wiki/Manual:Tools/Fetch
There is no explicit websocket support, but as noted in the other answer, you have the ability to connect to a simple website, even do a POST. You could also do something clever with tftp. If none of this suits, you could probably use metarouter with something like busybox to achieve the connection.
Related
I would like to ask if it is possible to ask RTSP server, how many streams does it provide and what are their URL addresses. I have an IP camera from China. Unfortunately, I have not any documentation. There is the port 554 opened. I have tried tellneting to it, trying "DESCRIBE rtsp://my_ip_address/media.amp RTSP/1.0". It was answering with verison of RTSP server and error code. Trying to connect by VLC player (url /media.amp, /stream0, /0 etc) but without success. Is there any way, any command, how to ask the rtsp server for URLs which it is providing?
If you have no clue you can just test popular IP cam RTSP addresses.
You could also try ONVIF device manager to try and discover available RTSP feeds.
https://sourceforge.net/projects/onvifdm/
I want my client program to communicate with a server without making the user add an exception to Windows Firewall in elevated mode. Is there a way to do this? HTTP? For instance, uTorrent and Google Chrome can both be installed by a regular (non-admin) user, and both programs network quite extensively - how do they do this? Am I missing something about how the firewall and/or ports works?
Yes there is a way. Assuming that your client program is the one running on the users machine and that your client program is the one initiating communication with the server then your client program generally would not need to require end user to open any exceptions in the windows firewall as long as you stick to using http over port 80. Http on port 80 is generally open for outbound traffic (initiated by the client) and therefor you could build your communication (and if needed your own protocol) on top of the http protocol. This is the typical scenario for webserver and webbrowsers (clients).
If you need the server to initiate the communication it becomes more complex and a lot of different approaches could be used. Choice of communication channels and structure should depend on factors like whether you would want to communicate to one client at a time or many (broadcast/multicast), do you need encryption, what are your needs for speed (throughput and latency), what kind of system are you trying to build and so on.
Many webapplications achieve an effect of a server initiated communication by using special techniques called polling, long polls, comet, websockets and so on. these work through http on top of tcp/ip on port 80. Other systems employs subscription mechanisms to be able to get notified through a third part if something new has happened. If you need server initiated communications please let me now and i will try to give a better explanation on the options.
I'm thinking about just making my own http client with simple GET requests to generate the traffic, but how do I create multiple source IP's for each socket?
Create lots of clones of the http client.
If your client doesn't actually live at the IP address that you're telling the destination - your client won't receive the responses from the server, and that may cause problems in your testing.
So, that being said - You can quickly script CURL to make the HTTP requests. This post shows how to make CURL set the source IP address in the HTTP header.
The other half of this solution would be to bind multiple IP addresses to the NIC on the source machine. This other article explains doing this for windows, and this one shows it in Linux.
If you're set on writing your own client, you can alternate the binding of your socket to the different addresses you created above.
In Vsphere 5, you can have 10 nics per VMs.
But as stated above, creating multiple cloned clients is probably easier to maintain from a networking/routing perspective.
I'm trying to connect to an FTP server over HTTP. Is there any way I can use a VPN like Hamachi and tunnel through my home PC, then connect tothe FTP via HTTP or another port?
The main problem with FTP over HTTP is not port mapping, but being able to translate HTTP commands to FTP. Something like mod_proxy_ftp should help. Note that FTP over HTTP proxies tend to support only fetching of files and listing of directories, i.e. they convert a directory URL to a LIST commands, and a file URL to a RETR command.
I realize I might not have answered your exact question, so apologies if there is a strong reason why you need to use VPN and not a proxy. Still I can't see how a VPN would do the protocol conversion.
When creating apps that interface on various TCP protocols (apart from HTTP), we need to test our app and how it communicates with a real server.
Now typically with shared hosting you can't install any low level service to talk protocols like POP3, IMAP for email, SIP or XMPP and for instant messaging.
So are there "test" servers that exist (like example.com) that help you debug or test if you app is speaking that protocol correctly?
Or maybe its easy enough to install some email/IM protocol server on another local PC and then we can use Wireshark to test with that?
I think wireshark is probably your best bet. I have never heard of publicly available test servers, I would install a server on your LAN and use that for testing.
Windows Server comes with a built in SMTP server. Try here for some information
There is a list of XMPP servers here, I have personally used OpenFire on Windows.