Traccar Tracker Server As Proxy

Traccar Server is the best Tracker Server is open source and has solid performance to track every gps devices with many variant protocol supported. It works as location server, accept and track every location transaction from gps devices, it show the real time movement of the devices, with map layer that we can customized, and it has user management roles with customized device identifier.

9-26-2016-3-04-27-pm

Above is the sample of tracker server that we implemented for several Gps devices like FM1120, G15c, and Gt06. Each of the vendor has their own protocols , and Traccar support most of them, but for special device like G15c, we can build our own protocol on it and plug into the Traccar Server.

The question that we have right now is how to make this tracker server flexible enough as a proxy server, so that location request from gps devices can be forwarded to another tracker server (other than Traccar). Yes, it’s possible.

Each of the protocol inside Traccar is interpreted with a base socket decode/encode stacked modules came from JBoss Netty, and we can put new module called forwarder/proxy before it jump into decode/encode stacked module.

Inside the forward module will only read the packets data without any corruption, because the data will read by encode/decode stacked module in the end. The forward module will act as forwarder, to bring the packet data as it is to the other third party tracker server.

9-26-2016-3-24-46-pm

In this example we going to add proxy for Gt06 Protocol for all Gt06 Gps Devices, by adding new module called Gt06ProtocolForwarder, so that every packet inbound data will go thru will forward first into third party if is enabled.

To validate which protocol can be forward enable or not, we can use existing traccar configuration file like below

9-26-2016-3-29-08-pm

The full source code you can find is in here https://github.com/biskandar/lacak-tracker-server