BTW, here is some additional information in regards to #2 question.
cgminer version is 4.9.2 latest.
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getdifficulty", "params": []}' -H 'content-type: text/plain;'
http://127.0.0.1:8332/Then I got the response back like this..
{"result":194619292.4408354,"error":null,"id":"curltest"}
cgminer runs on the same machine where the bitcoin-qt is running.
./cgminer -o
http://127.0.0.1:8332 -O myusername:mypassword --btc-address myaddress -D -T --verbose
Here is the response.
[2021-02-23 23:20:43] Testing pool
http://127.0.0.1:8332 [2021-02-23 23:20:43] Probing for GBT support
[2021-02-23 23:20:43] HTTP request failed: The requested URL returned error: 500 Internal Server Error
[2021-02-23 23:20:43] Failed to connect in json_rpc_call
[2021-02-23 23:20:43] No GBT coinbase + append support found, pool unusable if it has no stratum
I *intentionally* provided wrong username and password...then the response I got..
Probing for GBT support
[2021-02-23 23:26:41] HTTP request failed: The requested URL returned error: 401
[2021-02-23 23:26:41] Failed to connect in json_rpc_call
[2021-02-23 23:26:41] No GBT coinbase + append support found, pool unusable if it has no stratum
401 is unauthorized, which is correct because I provided wrong username and password...so I believe cgminer has no issue to contact the JSON RPC server, which is
http://127.0.0.1:8332....
here is my bitcoin.conf
testnet=1
server=1
listen=1
rpcuser=myusername
rpcpassword=mypassword
rpctimeout=30
[test]
rpcport=8332
Thanks,