I am not too sure if this is what you mean, but why not just take a piece of cloth (one similar in stretchability, etc. to the boxers), cut it to a size to accommodate the stp and then sew it using a simply running stitch or using a sewing machine into the inside of the boxer? Probably somewhere near the hip or front thigh would be the most comfortable place for it if you want the stp to sit vertically. For horizontally, sewing the pocket just underneath the band in front would probably by the most comfortable place for it.