This is what I did.
I cut open the trailer end plug and chased down what each wire did, matched them to the 4 wire plug for my truck.
On the trailer: On the truck 4 wire plug
white wire (right blinker) green wire
Blue wire (brake) left unplugged (see below)
Red wire (running lights) brown wire
there is a weird jumper inside the plug
gray wire (left blinker) yellow
black wire white wire
There were a couple of wires I had to put together on the trailer so use larger terminals or whatever wire supplies needed too make them fit...
The only other change was in the back, using a small screw driver I switched the spades inside the factory plug going to the red lights in the rear (un-did the blue and replaced with the gray and white wire, one each side)
this does not use the yellow lenses at all. I plan to replace them with red and tap into the rear side running light for power.
To test, I ran jumpers from the trailer's battery... just remember to test the blinkers, you have to touch/untouch/touch/etc. the flasher part is in the truck. This is on a Toyota, but I think the 4 wire YBGW is standard.
hth