This project designs and implements programmable system elements to be run within the anonymity networks, such as Tor (The Onion Routing network). The central idea is that users can inject new code into the network that is then run within a protected execution environment. The motivation is to enable the creation of new and significantly enhanced anonymity services, such as content distribution networks, of use in today's and future anonymity networks. The project carries potential to demonstrate that an anonymity communication network, such as today's Tor network, could deliver a much larger range of services that could greatly enhance the potential range of offerings over secure, anonymous networks, motivating further developments. The proposed research has four main and original thrusts: (1) Programmable Tor middleboxes, (2) Censorship-resistant hidden services, (3) Hidden-services-based content distribution network (CDN), (4) Decentralized anonymous credentials. Much thought and development will also go into the applications that can be built upon the proposed functionalities, and as a result, if successful, the end possibilities are expected to be transformative. The training obtained by students during the investigation spanning across cryptography, secure computation, and anonymized communication networks are expected to result in a cohort with a distinctive, important and useful set of skills.