Tor, an anonymous communication system that protects the privacy of individuals, is gaining more and more attention. However, there are some problems with the Tor system, such as: security issues such as vulnerability to de-anonymisation attacks, centralised and poorly scalable directory servers, bot nodes disrupting the system; social issues such as illegal transactions in the dark web disrupting social security; performance issues such as high communication latency and low system throughput. To address these issues, a new anonymous communication system, B-Tor, is designed and implemented based on the Tor architecture model and the mainstream consortium blockchain architecture, Fabric, which uses the decentralized feature of blockchain to solve the security problems in Tor. It also provides a solution to the problem of unregulated and illegal transactions in the system. The system meets the needs of users for anonymous communication while reducing the harm caused by the misuse of anonymous communication technology. The experiments show that B-Tor can achieve a decentralised structure by reading smart contracts to obtain consensus files, and that it can successfully receive consensus files 790629 times in Article Title 600s of testing time, with a success rate of 98%, an average throughput of 1312.9TPS and an average latency of 0.1s. The experimental results show that B-Tor has high efficiency, high load and low latency.