mitmdump -p 8080 --rawtcp --modify-headers :~q:User-Agent:@~/useragent.txt -s tls_passthrough.py
Using the above command (with and without --rawtcp)