The extensible (yellow) classes are modified by deriving from p2p, overriding the virtual attach methods to attach custom derived sessions, and overriding session attach methods to attach custom derived protocols. This is how libbitcoin-node is constructed (adding transaction and header protocols). Of course, the same can be done in libbitcoin-node, and libbitcoin-server inherits from it (though does not change its protocols).