You should try using a flange which can be used as a plate or ring to form a rim at the end of a pipe when fastening to the pipe - like a closet flange. Alternatively a blind flange may be used for covering or closing the end of a pipe and diverting the flange joint, similar to that of pipes, should allow the connecting pieces to have flanges by which the parts are bolted together.
If you can't get hold of a flange, try a sprocket or a widget.