P4P (Provider Portal for Applications) integrated P2P (peer-to-peer) network is one of the main trends of P2P networks. While P4P brings advantages to P2P, it also brings new challenges in solving trust problems in P2P networks. In this paper, we consider the P4P's characteristics, domain partition and strategy matrix guidance, and propose a novel domain-based trust model for P2P networks. In our model, we distinguish peer's intra-domain behavior and inter-domain behavior. Peer's intra-domain good behavior does not mean that the peer also behaves well when interacting with other domain's peers, due to P4P's inter-domain traffic control. In addition, we give each domain a trust value, using them to modify the strategy matrix provided by P4P. Simulation results show that our model can effectively distinguish good peers and malicious peers. Even when a peer behaves well in its own domain, our method can make other domains cooperate together to evaluate the peer's bad inter-domain behavior. Lastly, using the domain's trust value to modify the P4P's strategy matrix can reduce the impact of malicious peers' cheating behavior on forming the strategy matrix.