I got some STi headlights a few years ago which come with the headlight levelers. While the light portion is plug and play, the levelers were not because it wasn't an option on the WRX. On the 2006 Headlights I have, the leveler system uses a three pole connector. Earlier years like 02-05 use 6 pole terminals.
Doing some research on the lights, I found that most guys simply cut the connector off the headlight housing and hard-wire the levelers into their car. I didn't like the thought of this since I prefer factory connectors and I want to be able to remove my headlights with ease. I got my hands on a 2006 STi harness but found that the connectors for the levelers had been cut. So I got on the internet and began searching Japanese connector suppliers until I found the source of the connector I needed. I was able to order samples. Enough to make 5 pairs. Now it was possible to wire these in like factory.
It should also be noted that the 06-07 STi uses a different style switch than the 02-05's. You can interchange them, but it's not straight forward, so I stayed with the 2006 style switch. I was able to pull the switch harness connector off the STi harness so I didn't have to hard-wire the switch either.
The connector consists of 4 main parts: the housing, the terminals, the seals, and the lock (green square piece of plastic):
First you strip the wire back and install the silicon/rubber seal. The terminal is then crimped into place. It has two sets of crimp legs, one set for the contact with the wire and one set (the taller ones) to hold the seal/insulation in place. There are special tools to crimp these properly, but I don't have them. Instead, I simply used pliers to carefully fold the crimp legs down. You have to be careful not to distort the terminal too much or it won't fit in the connector housing. To make sure they were strong, I soldered the wore to the terminal ever so slightly. This isn't needed if you have proper crimp tools.
After you have your wires and terminal crimped, you simply insert them into the connector housing until they click.
Then you insert the teal/green lock into the front of the connector. This locks the terminals into place so you can't yank them out when working with the connector.
The wire I used was a bit thick, but it works. These connectors were designed for #18 AWG, but I used #16 AWG because it's what I had on hand.
In that last picture, you can see the wires leading into the factory harness. OEM-esque!